1

My website is available in two languages: dutch and english. The website has the dutch tld: http://www.example.nl.

The homepage does two things:

  • Display the dutch version of the website for dutch visitors
  • Redirect to http://www.example.nl/en for all other international visitors.

Normally I would do something like this in my html head:

<link rel="alternate" href="http://www.example.nl/en/page/a" hreflang="en" />
<link rel="alternate" href="http://www.example.nl/page/a" hreflang="nl" />
<link rel="alternate" href="http://www.example.nl/page/a" hreflang="x-default" />

But because the main page (without the language parameter) is redirecting for international users AND is giving the website for dutch visitors as well, I don't know how to set it correctly.

Normally I have a /nl page and a /en page, and a / page that does the redirects, but now I merge the /nl page with the root domain.

How to set the hreflang tags? And the x-default? Should I set the x-default at all?

Jordy
  • 4,719
  • 11
  • 47
  • 81
  • If someone visits `/`, gets redirected to `/en`, and then enters/clicks at `/` again - what happens? Does the user stay on `/` or does the user get redirected again? – unor Jul 18 '16 at 18:52
  • When his browser has the Dutch language he stays on /. When it is not Dutch: it redirects to /en – Jordy Jul 18 '16 at 19:02
  • Yes, I mean in the second case: if the user (that just got redirected) visits the Dutch page again, does the user get redirected again? If yes, that would be a bad practice; there are many reasons why someone (humans as well as bots) could want to visit the Dutch pages without having set Dutch as language in their browser. – unor Jul 18 '16 at 19:06
  • Good point, I think i'll move the dutch page to /nl and keep the / as redirect page. – Jordy Jul 18 '16 at 20:03
  • [I’d prefer to represent the default language in the URL, too](http://stackoverflow.com/a/38363403/1591669), but another option is, of course, to stop redirecting (then you could keep the URLs like they are). Most sites just offer a [language switcher](http://stackoverflow.com/a/20157416/1591669) (typically in the top-right of the page), so users can switch to their preferred language whenever they want. Users coming from search engines often end up on the correct version anyway (assuming that the search engine indexed both versions). – unor Jul 18 '16 at 20:15

0 Answers0