1

I've recently began working on a Wordpress site that uses cookies to redirect a user to the appropriate regional page based on their location with geolocation.

One thing I've noticed is that this might have a detrimental effect on my site as I don't think spiders can crawl the site fully as they can't store cookies??

Am I right in assuming that Googlebot does not store cookies and if so then have I completley gone about implementing my site in the wrong manner?

I've done a bit of research on this and have not seen a definitive answer. I've come here to see if the community would have more information.

Any help is greatly appreciate.

Thanks

6
  • Do you have alternate hreflang tags in place across your pages? Are all of your pages allowed to robots for indexing? May 5, 2016 at 9:08
  • Yes I do I've got these in the header.php file May 5, 2016 at 9:12
  • Then I don't understand what difference cookies would make. May 5, 2016 at 9:30
  • My worry was if a spider comes to the site and I assign it a cookie based on its region and redirect it that it wouldn't maintain this cookie so it would effectively end up in a loop going from / to /us over and over May 5, 2016 at 9:34
  • How do you know which version to redirect a new user to, since they won't have any cookie yet...? May 5, 2016 at 9:43

1 Answer 1

2

In short, you're right that search engines don't typically read or store cookies. However this shouldn't in itself cause problems for you.

You haven't said which, but you're using either the user's IP address or browser language setting to determine which regional page to redirect to. Presumably, there's also a default region which is used if your conditions aren't met. You then set a cookie so the site "remembers" where to send a repeat visitor.

Most search engines crawl from a single geographic location and don't send Accept-Language HTTP headers, so can't necessarily "see" how these conditional redirects work. As a result, we need to ensure that all versions are crawlable and provide information (like hreflang) which identifies the intended audiences for our content.

Google have recently tried to address this with "locale aware crawling", whereby they issue Accept-Language headers and crawl from multiple, geographically diverse IP addresses. However, we don't know much more detail than that, so we can't make any safe assumptions about how this works in practice.

So:

  1. Ensure that search engines can fully access all regional pages (i.e., crawlable links between them)
  2. Use hreflang – this is currently supported by Google and Yandex
  3. Use lang attribute of <html> with ISO language or language-country pairs to indicate target for other search engines (Bing, etc.), e.g., <html lang="en-gb">
1
  • That's a brilliant answer and very helpful thanks very much :) May 10, 2016 at 12:13

Your Answer

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

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