When launching a website in multiple languages we must implement some measures so that Google correctly understands the internal structure of the website. Among other things, this will allow the website to be better positioned and let the users find the version of the website in their language more easily.
"Hreflang": valid tags for Google and Yandex
The first thing we need to understand is that Google is capable, to a large extent, of understanding in which language our website is written. However, there are some situations in which it needs a bit of help. To do this, "hreflang" tags are used which must be placed in the website header, within the "head" tag. This method of tagging the language is also valid for Yandex, the most-used search engine in Russia.
The system is simple: on each page of our website, we must place a tag which links via a hyperlink to the other versions of this content in different languages. Let us imagine that we have published our site in Spanish and English. In the Spanish version we need to place a link to the English version, and vice versa. The syntax would be as follows:
In the Spanish version:
link rel=»alternate» hreflang=»es» href=»http://www.ejemplo.com/en/»
In the English version:
link rel=»alternate» hreflang=»en» href=»http://www.ejemplo.com/es/»
In order for the language marking on the page to be correct and for Google to understand it properly, we must use the ISO 639-1 nomenclature. In addition to the language code, we can combine the country code, telling Google that the page is an English version specifically for the United States, for example, with the code "en-US". For this we use ISO 3166.
If we want to tag a page of our website as a default alternative version for all the languages for which we have a translation, we can use the "x-default" tag. For example:
link rel=»alternate» hreflang=»en» href=»http://www.ejemplo.com/en/»
link rel=»alternate» hreflang=»es» href=»http://www.ejemplo.com/es/»
link rel=»alternate» hreflang=»x-default» href=»http://www.ejemplo.com/ »
What does this tagging achieve?
Better visibility in search engines: Google will prioritise each language version depending on the language in which the user makes the search and their location. Therefore, a user searching in English from the UK would first come across the English language version of our website.
It will increase the click rate for search results: if we offer users a search result in their language, it is more likely that we capture their attention.
We will avoid duplicated content: if we have a version of our website in English for the USA and a different version for the UK, Google will understand that they are distinct alternative versions of the content and it will not detect these cases as duplicated content (which could damage our position).
All in all, these are the steps to take in order for Google to find and better position all the translated versions of a website.