There are many strategies for acquiring new visitors. One of them is making the website available for foreign users, which requires creating additional versions of the website in different languages. Once the content has been written and published in a different language, the next step is to notify search engines and indicate all language versions using the hreflang attribute.
Most commonly, to indicate additional language versions, extra code is placed in the <head> part of the page:
Several rules should be followed when using hreflang:
1) the use of absolute URLs (the full address containing the host and the protocol)
2) the use of separate URLs for different language versions
3) self-indication, meaning that the Polish version of the website points to itself and additionally points to the URL of a different language version. In the example below, the English version is indicated as “en”. For https://www.pulno.com/pl proper rel canonical and hreflang meta data should be:
The examples published above include country codes in hreflang parameters. They do not, however, take into account the differences in American and British spelling. The spelling may vary, depending on whether the users are in the United States or in Great Britain. Differences may also occur in the displayed currencies as well as in the date format. Hreflang enables us to indicate appropriate language versions by including the code of the region:
<link rel=”alternate” href=”https://www.example.com/US hreflang=”en-us”>
for users from the United States,
<link rel=”alternate” href=”https://www.example.com/UK hreflang=”en-gb”>
for users from Great Britain.
In the case of region and country not matching user settings, search engines will display the "x-default" version. For Pulno, the default language is English.
The hreflang parameter and the canonical tag can be used simultaneously. To remind you, the canonical tag indicates the page that is to be indexed by Google (read more about the canonical tag in our SEO dictionary and in the article on duplicate content). If you use the hreflang and intend to use canonical tags as well, remember that the canonical tag should indicate the URL address that corresponds to its language version. For an English version of a website such as https://www.pulno.com, you should set:
whereas the Polish version https://www.pulno.com/pl should be:
as in this example:
Pulno checks the canonical and the hreflang parameters and shows them in the page analysis results:
Common mistakes in the use of hreflang:
Google recognizes three ways of implementing the hreflang parameter. The one depicted above is the most commonly used. It consists of placing the code in the <head> headers. Hreflang might also be placed in sitemap files as well as in HTTP headers. Find out more about those less common solutions on Google.
The search in Polish on Google.pl shows www.pulno.com/pl
The search in English in Google.com shows www.pulno.com:
Google recognized the hreflang parameter correctly and showed two different language versions in search results, depending on the location of the search.
Tags: multi language seo, optimizing websites in multiple languages, hreflang mistakes, hreflang canonical, incorrect hreflang implementation
Jacek Wieczorek is the co-founder of Pulno. Since 2006, he has been optimizing and managing websites that generate traffic counted in hundreds of thousands of daily visits. |
11-03-2019
Enter website URL to start free audit