1

The URL's of my website open as per IP detection. That is, for UK it is example.com and for USA it is example.com/usa. But Google is unable to crawl example.com/usa. It is crawling just example.com.

Do you know how to fix this?

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
  • Are you saying that you are showing either the root (/) of your website or the sub directory (/usa) depending on the location detected of the IP address of your visitor? – zigojacko Jun 13 '16 at 11:48
  • Yes, exactly!!! The Google is crawling just the root url & not the sub directory one. I have checked even the cached version of the sub directory, it is same as the root. Please provide me the approach so that I can get sub-directory url crawled by Google. – Aastha Varshneya Jun 13 '16 at 12:11
  • 1
    You shouldn't really use GeoIP to redirect users, you should gracefully ask them first. So, GeoIP detects UK IP address, it asks if they would like to go to the UK site, then when they hit yes... it stores a cookie for future visitors. This method is common practice and big websites use it. If your 'FORCING' users, it'll force the bots too. Problem I see is the redirect, not Google. Also, some users may be in the UK on a holiday, but want the US version of the website... so from a UX stand point, force redirects are bad for UX too. – Simon Hayter Jun 13 '16 at 12:26
  • 1
  • I was just going to follow up with basically what @SimonHayter has already said. The bots will be redirected as well and Google will have lots of IP addresses all over the place, you're more than likely inadvertently redirecting GoogleBot to example.com from example.com/usa. You should fetch the URL as GoogleBot to see what is happening. The accepted answer that @StephenOstermiller links to is a great place to start on how best to implement all this. – zigojacko Jun 13 '16 at 13:52

1 Answers1

1

Use Hreflang codes to indicate to Google which site it should index for which region.

You'll find it then indexes all those links and presents them according to the engine the user uses to access the site. This largely replaces the need to identify a users location - even using a good service, it's going to be wrong if a user is behind a VPN or is part of a shifting IP block.

L Martin
  • 4,003
  • 11
  • 25