For each URL on my site, I'm auto-redirecting according to header accept language. The site arch is

English version: http://mydomain.com/page
Spanish version http://es.mydomaina.com/page

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"?

  • What if I'm using a Spanish-language browser (maybe in an Internet cafe in Spain?) but I want to read your pages in English? Is there some link I can click, or am I SOL? (Ps. One reason I'm asking this is that I think the answer may affect the hreflang markup you should use.) Jan 10, 2014 at 2:54

4 Answers 4


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:

http://example.com/en-gb: For English-speaking users in the UK
http://example.com/en-us: For English-speaking users in the USA
http://example.com/en-au: For English-speaking users in Australia
http://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" />
  • 2
    Wouldn't it make sense to use the Accept-Language header when it exists, to redirect to the preferred language? Also, on each page, a language selection menu will offer the user to go translated pages. That way nothing is hidden from Google, and also the user won't have to manually select something already selected. May 18, 2020 at 16:48

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.


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.


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?

  • 1
    I have links to all other languages in the footer for Googlebot to be able to reach these pages without sending an Accept-Language. I am aware of the guidelines to avoid redirect, but feel it is providing for value for my users. You didn't comment on the x-default, so I have it?
    – Noam
    Nov 11, 2013 at 8:11

I believe your English version should be hreflang="en x-default"

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.