Redirecting a visitor to their country's version based on their IP address is not cloaking as long as Googlebot gets the same treatment as the user. Google nevertheless advises against this automatic redirect today: it prevents its crawlers from seeing all the versions of a multilingual site.
- Detecting the IP and serving the country's content is still accepted, provided you make no exception for Googlebot.
- Google's current documentation recommends avoiding automatic redirects from one language to another.
- hreflang annotations and visible links to each version are a better alternative to forced redirects.
The starting point: is an IP-based redirect cloaking?
I was still asking myself the question not long ago for some sites I work on, because they redirect the user based on their geolocation to the version of the site in the appropriate language.
So I wondered whether this could be considered cloaking or not, and whether we could be penalized for it.
Matt Cutts' timing was nice on this one, because he had just released a new video that answers the question:
Matt explains that if you detect a user through their IP, and offer them the content relevant to their country (a specific page or a specific domain), there is no problem.
However, you must make no exception for Googlebot: if you check Googlebot's IP, you must redirect it to the appropriate page (if it comes from the United States, you redirect it to the English version, the .com, the page or the domain: whichever version is most relevant).
He re-explains the principle of cloaking (different content for the user and for Googlebot) and reassures one last time: if you offer the same thing to Googlebot and to the user, there is no issue, so you can redirect a visitor based on their IP without fear of being penalized.
What Google's documentation recommends today
Geographic redirection is therefore not a fault in the cloaking sense, but Google's help page on multi-regional and multilingual sites goes further than Matt Cutts' video. It asks you to avoid automatically redirecting a user from one language version to another, and not to redirect based on the language you assume to be theirs. The reason given is easy to understand: such redirects can prevent visitors, and search engines, from viewing all the versions of the site.
The same document also advises against adapting content by analyzing the IP address, which it considers difficult and unreliable. Google points out there that most of its crawling originates in the United States and that it does not vary its location to discover a site's variants. In practice, a site that sends every American visitor to the English version risks showing only that one to the crawler: the French, German or Spanish versions are then poorly crawled, poorly indexed, and struggle to rank in their own country.
Language-adaptive pages
Google calls locale-adaptive pages the addresses that return different content depending on the visitor's presumed country or language, without changing the URL. For these pages, its documentation warns that it may not crawl, index or rank all the content intended for the different regions. Googlebot does have IP addresses located outside the United States, in addition to American ones, but Google still recommends separate URLs per language, annotated with hreflang.
How to offer the right language without a forced redirect
A well-designed multilingual site guides the visitor without locking them into one version. Several methods, cited by Google, can be combined:
- One URL per language or country: subdomain, directory or country domain, each version has its own address and can be crawled separately.
- hreflang annotations: declared in the code, the sitemap or the HTTP headers, they tell Google which version to show in its results for each language, with the x-default value designating the page to offer when no language matches.
- Visible links to the other versions: a language or country selector present on every page lets the user choose, and the crawler follows these links like any others.
- A suggestion rather than a redirect: a banner offering the local version ("This site is also available in French") respects the visitor's choice and does not block Googlebot.
When the same site exists under several extensions, the neighboring question is duplicate content across domains: the case of the same site served on .com, .fr and .fr.com is handled differently, with a permanent redirect to the main address.
Keeping a geographic redirect: precautions to take
Some sites keep a geographic redirect for business reasons, for example when prices, delivery or the catalog differ from one country to another. The rule set by Matt Cutts then still applies: Googlebot must be treated exactly like a visitor coming from the same place, with no list of exceptions by user-agent or IP. It is better to prefer a temporary redirect, keep a link to each version on every page, and remember the user's manual choice so as not to redirect them again afterwards. For any permanent redirect from one address to another, the method described for redirecting an old URL to the new one avoids losing the pages' history. The choice of the site's canonical address, with or without www, is also made before building the country versions.