Articles on: SEO
This article is also available in:

Setting the hreflang attribute for pages

The hreflang attribute helps search engines (such as Google) to find other language versions of the current page on a multilingual site. Thus, a search engine understands that several pages are alternative and are written in different languages. It allows search engines to display pages in the search results in the most convenient language for the client. It can increase your conversion and reduce bounce rate, as your target audience will land on the most appropriate page's language version for them.

Tip: When creating a language version of a site, all of its pages are copied into the new language version, and hreflang attributes are set for them automatically. This way, each page has hreflang directed to its duplicate in another language. Therefore, we recommend creating all the necessary pages in 1 language first and then, based on it, creating other language versions of the site according to this guide.

Adding the hreflang attribute to the page


If you have added the same new pages to several site language versions after creating a multilingual site, you may need to link them manually with the hreflang attribute to improve the site's search engine optimization. Follow the following steps to do it:

In the editor, go to the list of your site pages, open the Settings of the needed page, and in the SEO tab at the very bottom, click on the Edit button next to the word Hreflang:


You will see one or more drop-down lists (depending on the number of language versions on the site). In each drop-down list, you can see the corresponding page in a different language version of the site — the same page, but in another language:


If the page was added after the creation of the site's language version, then you should manually select a page or pages from other language versions for the hreflang attribute:


Tip: If you added the hreflang attribute on the first language version of the site specifying a page of the second language version, then in that second language version, the hreflang attribute will be automatically added to the corresponding page. For example, by adding hreflang from an English-language page to a French-language page, the hreflang will be automatically added from the French to the English-language page.

Do the steps above for all the pages you need and publish your site.

Done! HTML tags with the hreflang attribute have been added in the code of your site's pages, which are pointed to other language versions of the current page, for example: <link rel="alternate" href="https://example.com/fr" hreflang="fr">.

Tip: You can also specify SEO region for language versions of your site. The SEO region will also affect the hreflang attribute (the region code will be added, for instance, hreflang="fr-fr").

Updated on: 10/12/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!