: How to use hreflang x-default I am not sure if I understand how to use hreflang="x-default" I have a website with two languages. In the head of each page I have a link to each language.
I am not sure if I understand how to use hreflang="x-default"
I have a website with two languages. In the head of each page I have a link to each language. For instance:
<link rel="alternate" hreflang="en" href="http://example.com/about" />
<link rel="alternate" hreflang="fr" href="http://example.com/fr/about" />
I have the page "language" To help people choose the language. It has two buttons. One to go to the home page in English and the other button to go to the home page in French.
Do I need to include in each page a link to "language"?
<link rel="alternate" hreflang="x-default" href="http://example.com/language" />
More posts by @Gail5422790
1 Comments
Sorted by latest first Latest Oldest Best
Yes, the hreflang="x-default" tag is used for language/country selector pages such as the page you describe.
But ensure to define every alternate link and a self referencing link on each page, so your mark up would look like:
example.com/language
<link rel="alternate" hreflang="en" href="http://example.com/about" />
<link rel="alternate" hreflang="ca" href="http://example.com/fr/about" />
<link rel="alternate" hreflang="x-default" href="http://example.com/language" />
example.com/about
<link rel="alternate" hreflang="en" href="http://example.com/about" />
<link rel="alternate" hreflang="ca" href="http://example.com/fr/about" />
<link rel="alternate" hreflang="x-default" href="http://example.com/language" />
example.com/fr/about
<link rel="alternate" hreflang="en" href="http://example.com/about" />
<link rel="alternate" hreflang="ca" href="http://example.com/fr/about" />
<link rel="alternate" hreflang="x-default" href="http://example.com/language" />
Also did you mean to use the language code ca? As that is Catalan language which is mostly spoken in Spain (although also in some parts of France, so perhaps valid in your case)
More info on hreflang tags from Google here: support.google.com/webmasters/answer/189077?hl=en
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.