Search engine optimization of multi-language websites - hreflang and canonical tags

Blog tutorial Search engine optimization of multi-language websites - hreflang and canonical tags
Paper flags of European Union, Great Britain, Germany, Austria

Why is hreflang used?

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.

An example of hreflang

Most commonly, to indicate additional language versions, extra code is placed in the <head> part of the page:

hreflang implementation

The correct use of hreflang

Several rules should be followed when using hreflang:

1) the use of absolute URLs (the full address containing the host and the protocol)

correct and incorrect hreflang setting

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 proper rel canonical and hreflang meta data should be:

hreflang parameter with canonical tag

Division into languages and regions

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=” hreflang=”en-us”>

for users from the United States,

<link rel=”alternate” href=” 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 use of hreflang and canonical tags

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, you should set:

canonical tag

implementation of hreflang parameter with canonical tag for English website

whereas the Polish version should be:

canonical tag

as in this example:

implementation of hreflang parameter with canonical tag for Polish website

Pulno checks the canonical and the hreflang parameters and shows them in the page analysis results:

canonical and hreflang parameters shown in Pulno analysis

Mistakes in the use of hreflang parameters

Common mistakes in the use of hreflang:

  1. an indication of a different language version of the website in the canonical tag
  2. use of relative URLs
  3. wrong country code. The use of hreflang=”uk” instead of hreflang=”en-gb”

  4. no self-indication in the URL
  5. no return indication. If indicates as an English version of the website, then the English version should indicate as the Polish version of the website.

Ways of implementing 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.

Implementation results

The search in Polish on shows

search results for Pulno in Polish

The search in English in shows

search results for Pulno in English

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. 

Get in touch:   


SEO Audit and Website Analysis

Enter website URL to start free audit

Enter valid URL
Enter valid e-mail
You have to accept the terms.