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

I have website with multiple languages and at first entrance it checks for cookie and if no cookie is present then it defaults to English language and redirects to site.com/en.

So basically every time someone enters site.com he will be redirected to site.com/{language}. Is this bad for SEO?

share|improve this question
What HTTP status are you returning? – Itai Jan 31 '13 at 1:44
up vote 4 down vote accepted

The problem with your set-up (from an SEO standpoint) is that search engines don't accept cookies, so whenever a bot follows a link to your root domain, it'll be sent to your English content. Hopefully, there's an abundance of links to the other language content, too, but in my experience, this situation nevertheless seems to lie at the root of a lot of geotargeting difficulties.

This might be why Google recommend that you "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."

I have a client whose /en/ pages (they have umpteen other languages on their domain) show up for most searches globally, despite there being good region-specific alternatives, and despite employing Google's rel="alternate" method. The only remaining cause appears to be that they default to /en/ at root in the absence of an Accept-Language HTTP header (search engines don't usually send one).

In short, I'd be inclined to allow users to manually choose their language and then set a cookie, rather than redirect.

share|improve this answer
Can you clarify if the en pages show up for keywords in another language? – Jayen May 3 at 5:50
@Jayen 'en' would show for English-language searches anywhere, except where there's a more specific alternative that would override it, e.g., if there's an 'en-gb', English language searches in Google UK should get that version in favour of 'en'. – GDav May 3 at 8:41
Ok I was a little thrown why /en/ pages show up for most searches globally as I thought you meant e.g., users in cn using keywords in zh-hans got en results, despite there being good zh-hans-cn alternatives. – Jayen May 3 at 8:46

As of Jun 10, 2014 Google recommends either ccTLDs, Subdomains with gTLDs or Sub-directories with gTLDs. URL parameters such as ?lang=en are not recommended:


(Funny that the page which says that it's not recommended to use URL parameters for this, is actually doing exactly this.)

share|improve this answer

Generally speaking, re-directing the user on page load is never a good thing. It's called a doorway page. However since this is with regards to auto-selecting the language, there shouldn't be any problems.

I myself prefer a different solution than re-directing them to /en/ or /de/, and that is to re-direct to /?lang=en instead. Since this signifies that it's the same physical page but with a language variable selected, it's not viewed as a re-direct in the strictest of definitions.

I honestly couldn't tell you whether that's better or not for SEO though.

share|improve this answer
Downvote, yet no comment as to why?.. – Patrik Alienus Jan 31 '13 at 21:55
+1 Good answer. That's what I use :) The nice thing about using a parameter is that you can then specify to Google that they should only index one version of the page and make it completely clear that this is not duplication. – Itai Mar 3 '13 at 21:30
As of Jun 10, 2014, Google does not recommend to do this: support.google.com/webmasters/answer/182192?hl=en#2 (also created an answer for this) – Sascha Gehlich Jun 10 '14 at 17:36

I assume that when somebody visits site.com/de with no cookies they still get the German version?

Other than that caveat, I don't see anything wrong with it from an SEO standpoint.

You could also consider redirecting based on the user's "Accept-Language" header that is sent by the browser. Here is somebody that uses some php code and mod rewrite to make it happen: http://stackoverflow.com/questions/1661915/how-to-redirect-based-on-accept-language-with-apache-mod-rewrite

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.