: Multilingual HTML structure to correctly be indexed by Google I have a page example.com that includes a language file based on visitor's country (through IP). There is only one page but several
I have a page example.com that includes a language file based on visitor's country (through IP). There is only one page but several language files.
Scenarios:
visitor in UK or any other country not supported by my languages -> example.com (language in English)
visitor from IT -> example.com (language in Italian)
The UK visitor changes the language to Italian -> example.com/it
The IT visitor changes the language to English -> example.com/en
The IT visitor who sees tha page in English, deletes the /en from the browser -> example.com (language in Italian)
HTML
I have set it like
<html lang="en">
<link rel="alternate" href="/it" hreflang="it">
Questions
Should I also add the "en" version, that means all the available languages?
Is my structure the correct way of doing this?
Thank you
More posts by @Margaret670
1 Comments
Sorted by latest first Latest Oldest Best
Your structure is correct. For the 'all languages' version, you can use the hreflang="x-default" attribute for this.
This is explained more detailed by Googles hreflang article.
You could have the following elements:
<html lang="en">
<link rel="alternate" href="/it" hreflang="it">
<link rel="alternate" href="/" hreflang="x-default"> <!-- or href="/en" -->
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.