My question is not technical (how to do it using X technology), it's about choosing proper approach that is good for SEO.


Let's say I have a website example.com. It's a multilingual site, but there is no default language at root level. Instead of that I'd like to redirect to proper subdirectory based on http_accept_language (or any other condition, whatever) to keep things consistent. Condition is unimportant right now, but let's make it easier with example:

example.com     # redirects to …
example.com/es  # … /es if spanish is accepted language
example.com/da  # … /es if danish is accepted language
example.com/en  # … /en otherwise

They're actually the same websites, with translated content so if example.com/en/items/1 exists, also /es/items/1 and /da/items/1 exist. Of course all pages have alternate hreflang links etc.


Is it good design? Can you tell me why if not? And how should it be done?

  • 1
    See also: How should I structure my URLs for both SEO and localization? which says that your language directories are fine, but doesn't address how to deal with the root page if there is no site there. Aug 23, 2017 at 18:15
  • 2
    @StephenOstermiller Yup, thanks, but actually all articles I found on the internet are about subdomains vs subdirectories vs params etc, but I can't find any informations about "how to deal with the root page if there is no site there". Obvious solution is redirection. Also, I found that google uses 302 redirect when I'm trying to enter google.com (it redirects me to local google). On the other hand, samsung.com uses 301. That's why I came with the question.
    – pfff
    Aug 23, 2017 at 19:15
  • 1
    One site that I know of with a similar problem is ikea.com. They have a page there that has the primary purpose of choosing your country instead of an auto-redirect. Aug 23, 2017 at 19:22
  • 2
    @StephenOstermiller There is much more examples: 1. Samsung.com (redirect based on location, 301) 2. Reserved.com (redirect based on location, 302) 3. Bmw.com (redirect always to /en, 301) 4. Ikea.com (let you choose). So as you see solution is not obvious and there is many approach in use. Personally, I don't like IKEA's approach, because it's +1 more thing to do for typical "lazy" user. And far better idea is to show them CTA and marketing stuff just right after enter.
    – pfff
    Aug 24, 2017 at 13:17

2 Answers 2


Many multi-lingual sites don’t have the language tag for the default/primary language in the URL¹, but I think it’s better to include it. So yes, in my opinion, it’s not only good design, it’s the best.

Its suggesting itself to use the root page as a site/language chooser. I think there are three ways how this page can work:

  • Redirect (based on certain conditions²)
  • Show a list of links
  • Show a list of links and pre-select/highlight the most likely choice (based on certain conditions²)

This page is likely not relevant for SEO at all, because search engines typically would have no interest to present a language chooser page to their users. Such a page doesn’t (shouldn’t) have any relevant content, and if it’s redirecting, it would be useless to lead users to this redirecting page instead of the redirect target page (search engines know, or assume to know, their user’s language).

The most important thing (and as you mentioned, you already do it) is that it’s not the only way to choose the language. Users (and search engines) should be able to switch to the translations of the current page with a language switcher/alternate+hreflang links.

Apart from that, as far as search engines are concerned:

  • For Google Search, you could link it with rel="alternate" hreflang="x-default":

    […] the reserved value "x-default" is used for indicating language selectors/redirectors which are not specific to one language or region, e.g. your homepage showing a clickable map of the world

    (I don’t understand why this could be useful, and I think it’s bad design (as the selector page is not a translation of a language-specific homepage) but they mention it in their documentation, so I think it’s better to note it here, too.)

  • If you redirect, don’t use 301. As the redirect is based on changing/user-specific conditions, it’s not permanent. And you probably don’t want it to get cached for a user (who might change e.g. the accepted languages in their browser and come back to the root page).

    302 (or maybe 307?) seems to be the right status code.

  • Maybe: You could consider to noindex this root page, if it’s really just a list of links.

¹ By the way, for sites that use subdomains (en.example.org, da.example.org) instead of path segments for the language tags, the same question comes up: what to do with example.org/www.example.org? I think the solution is the same in this case.

² The conditions could be the Accept-Language header, the IP address, or whatever makes sense in your context.

  • 1
    @benzkji wrotes in his answer: "Your most important URL, the /, is redirecting, with a 302! Or it's showing a list of language links (I would definitly not "noindex" the /), useless in terms of SEO, thus wasting your potential." You disagree with this? Is / most important URL? Can not you harm your SEO with redirecting /? Aug 14, 2019 at 10:36

I think the most SEO friendly way would be to define a default language. This content would be served from /. All other languages homepages would come from /lang/. And the pattern @unor proposes can still be applied: prefix all content with /lang/, for example /lang/about-xy/ - for the default language as well, as it is common best practice.

Why could it be better to serve a real / page? I have had cases where there once was a / page, but then the system changed to 302 redirects for all languages. And then the original / was kept indexed and showed up in search results (with outdated title tag, etc) for ages. So, this is the point: Your most important URL, the /, is redirecting, with a 302! Or it's showing a list of language links (I would definitly not "noindex" the /), useless in terms of SEO, thus wasting your potential. If you use ccTLDs, you can avoid this problem completely. Also, I heard people say it should be better to have the / page serving a 200 response. But cant find this post anymore.

  • "it should be better to have the / page serving a 200 response" reference please.
    – Steve
    Nov 23, 2017 at 23:10
  • @steve was sure I found this somewhere here on webmasters...but cant find it anymore! strikethrough!
    – benzkji
    Nov 27, 2017 at 9:50
  • So If you choose e.g. en as your primary language. You serve on / English version of homepage. What is then served on /en/? Same content on / and /en/?Probably not because of SEO. So you have to redirect from /en/ to / probably with 302? Right? or how? Aug 14, 2019 at 10:19
  • @MatějKříž you can even 301 from /en/ back to /, actually.
    – benzkji
    Aug 15, 2019 at 7:08

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.