1

We have the following geographic subdirectories of our website:

  • www.example.com (for USA and worldwide visitors)
  • www.example.com/en-au/ (for Australian visitors)
  • www.example.com/en-gb/ (for UK visitors).

We are currently using GeoTargetingWP to detect visitors' IP addresses and redirect them based on their location.

Because we're using NitroPack to cache the website, the GeoTargetingWP's IP address detection needs to be run by AJAX, as PHP resources are cached.

However, there is a lag of about 1 second to load the page and another 1 second for the redirection to take place, which we hope to improve.

We were hoping to use AWS lambda redirects to improve the speed of redirects between the 3 subdirectories, however, we found they also redirect Googlebot, which isn't what we want.

I'm hoping to receive some alternative suggestions that can perform a quick non-JavaScript geographic redirect between geographic subdirectories.

2
  • When you say "geographic subdirectories" you talking about /en/ and /fr/ for content in different languages? Are you currently doing redirects based on the Accept-Language header? Sep 29, 2022 at 10:28
  • @StephenOstermiller I've added detail. They're all using English. Redirection is based on the visitor's IP address.
    – Steve
    Sep 30, 2022 at 23:26

1 Answer 1

1

Automated redirects away from content in one language to content in a different language are fundamentally not compatible with SEO. Googlebot does crawling for multiple locations from the same set of IP addresses. There is no way treat Googlebot the same way as users without cloaking.

Instead of redirects, I recommend putting a notice in a prominent location on your page when it looks like the user is in the wrong place:

It looks like you are from the UK but have landed on our site for Australian visitors. Click here to visit our UK site which has appropriate shipping and support options for your country.

That allows search engine bots to get all your content and for users to ignore the warning if your GEO IP detection is wrong or if they are traveling abroad.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.