Back

Language versions

What are the language versions ?

They are the different versions of a content written in several languages and accessible from different URLs. These versions are indicated and specified thanks to a hreflang link present in the HTML code of the page.

Why is it important to indicate the language versions ?

It is important to clearly indicate and specify the localized versions of a content in order to help search engines to better understand it and redirect users to the most relevant and suitable version for them.  

How to indicate them to crawlers

The hreflang link can be defined in the HTML code of the page at the <head> level thanks to the <link rel="alternate" hreflang="code_langue" href="url_absolue" /> tag.

<head>
...
    <link rel="alternate" hreflang="en" href="https://website.com/en/cat" />
    <link rel="alternate" hreflang="pt" href="https://website.com/pt/gato" />
...
</head>

The localized versions can also be defined in an HTTP header :
Link: <url_absolue_1>; rel="alternate"; hreflang="code_langue_1", <url_absolue_2>; rel="alternate"; hreflang="code_langue_2". It is possible to define several of them, they are then separated by a comma ",".

Link: <https://website.com/en/cat>; rel="alternate"; hreflang="en",
      <https://website.com/pt/gato>; rel="alternate"; hreflang="pt"

The urls of these localized versions must be fully defined and the url must be accessible to crawlers. The language must also be valid and defined using the ISO 639-1 format: fr, fr-FR, en etc.