2

I run a site in Belgium for which default language is Dutch. Using a selector the user can translate the page into English and French.

When entering the site for the first time it's served in Dutch:

http://example.com/articles/my_article/

The language switcher gives you this English version (this places a language cookie for English):

http://example.com/my_article/?lang=en

The language switcher gives you this French version (this places a language cookie for French):

http://example.com/my_article/?lang=fr

The language switcher gives you this Dutch version (this places a language cookie for Dutch):

http://example.com/my_article/?lang=nl

Now I use the following canonical and alternate hreflang tags on this page:

<link rel='canonical' href='http://example.com/my_article/'/>
<link rel='alternate' hreflang='nl' href='http://example.com/my_article/?lang=nl'/>
<link rel='alternate' hreflang='en' href='http://example.com/my_article/?lang=en'/>
<link rel='alternate' hreflang='fr' href='http://example.com/my_article/?lang=fr'/>

The problem is, when you go back to the following URL after visiting a URL with lang=xy then it'll be served in the language based on the cookie that was previously set:

http://example.com/articles/my_article/

Does that mean I should add x-default for this page?

 <link rel="alternate" href="http://example.com/my_article/" hreflang="x-default" />
bart
  • 14,958
  • 21
  • 75
  • 105

1 Answers1

0

From my understanding, that is the way it is supposed to work. Once users select a language, they see the content in that language.

X-default should point to a "language/region/country selection page". In this case, it could be example.com/welcome that shows a menu to select a preferred language.

So x-default should not show any particular language page version. Like, choosing English to be x-default (example.com/my_article/?lang=en). No. It should point to the language selection page, like a welcome page. That page should be written in whatever language you think is the safest "catch-all", with a design that's easy to navigate even if you don't speak it (country flags with language name written in the language of the country, stating something like "English language site version" or whatever you think explains it the best).

Google explains it here: https://support.google.com/webmasters/answer/189077?hl=en

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
bikegremlin
  • 101
  • 3