: Should the English website use href="x-default" when it doesn't auto-redirect to the user's language or country? For each URL on my site, I'm auto-redirecting according to header accept language.
For each URL on my site, I'm auto-redirecting according to header accept language. The site arch is
English version: mydomain.com/page Spanish version es.mydomaina.com/page etc..
The english version is displayed unless I'm seeing a specific language other than en and that I support in the header, and then a redirect occurs.
Google says this:
For language/country selectors or auto-redirecting homepages, you
should add an annotation for the hreflang value "x-default" as well:
My pages aren't language selectors, nor are they the homepage. But I am auto-redirecting.
My question is, should my english version be hreflang="x-default" or/and hrefland="en"?
More posts by @Rambettina238
4 Comments
Sorted by latest first Latest Oldest Best
You should never ever auto redirect users based on their IP addresses or browser language settings! On this way you let Google think all of your site's language versions are much less important, as the english version, because 99,99% of all googlebot's visits your redirect it to the english version. Just because the most of time googlebot comes with IP address from US and without language setting.
Its true, googlebot can have a language parameter and it can come from another IP as from US, but it is absolutely rare situation.
It seems to be single one absolutely googlebot-conform kind of multi-language sites management, namely cookie-based:
on the first visit you give the user a possibility to select language and/or region and set the cookie with the choice.
On further visits you check the cookie and show corresponding language/region site's version.
Googlebot doesn't work with cookies - it will use only your hreflang attributes to crawl your site.
X-default should always show the fallback page for all new users, who hasn't yet specified the language/region choice on your site - this is in most cases your startpage, as in Google's example:
example.com/en-gb: For English-speaking users in the UK example.com/en-us: For English-speaking users in the USA example.com/en-au: For English-speaking users in Australia example.com/: The homepage shows users a country selector and is the default page for users worldwide
<link rel="alternate" href="http://example.com/en-gb" hreflang="en-gb" />
<link rel="alternate" href="http://example.com/en-us" hreflang="en-us" />
<link rel="alternate" href="http://example.com/en-au" hreflang="en-au" />
<link rel="alternate" href="http://example.com/" hreflang="x-default" />
You should avoid auto-redirection if you want all of your languages to be well indexed by Googlebot.
Googlebot never sends an "Accept-Language" header, so it will only get the default language and not be able to crawl the others.
Auto-redirection is also bad for users:
Many users get English browsers because they come pre-installed or are the default download. Those users may not speak English very well at all and would prefer other content.
Instead you should show a message to visitors (in the auto-detected language) that says something like:
This page is also available in English. Click Here to view this page in English.
For more information see: How should I structure my URLs for both SEO and localization?
In Google's guidlines they say
Avoid automatic redirection based on the user’s perceived language. These redirections could prevent users (and search engines) from viewing all the versions of your site.
support.google.com/webmasters/answer/182192?hl=en&ref_topic=2370587
But then they do say auto-redirecting homepages like you mentioned. Which slighty contradicts this. Perhaps they only want you to redirect home pages?
Personally I would raise this question in Google Forums to get a straight answer, due to Google's somewhat conflicting guidlines.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.