Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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.) – Ilmari Karonen Jan 10 '14 at 2:54

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?

share|improve this answer
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 '13 at 8:11

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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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