Hreflang is a link attribute that specifies the language and optional geographical targeting of a website. From the end-user’s perspective, hreflang helps search engines “decide” which URL of a multilingual website they display to the user, depending on the users’ language and region preference.
Hreflang helps distinguish the URLs in 3 main localization cases:
- One region, several languages
- Several regions, several languages
- Several regions, one language
Hreflang can be implemented by using tags in the HTML (most common), HTTP headers or via XML Sitemap. If the website targets many countries and languages, the SEO experts recommend favouring a non-HTML solution. This is to keep the code less complex.
For search engines to understand the hreflang, the values that define the languages need to correspond to ISO 639-1 and countries to ISO 3166-1 standard. The value can be a language or a combination of language and region. A country-only value is not accepted. For example, mysite.com/fr stands for a website in the French language while mysite.com/fr-fr is targeted to French speakers in France and mysite.com/fr-ca to French speakers in Canada.
Adding hreflang is an essential practice for informing search engines about localized content. However, it does not guarantee an expected result in the case of very similar languages. For example, if a product page in American English is targeted to the UK market with minor changes and only hreflang is added, search engines count it as a duplicate page. Consequently, this product page does not appear in search results. To avoid this issue, the website’s content in similar languages needs as much localization as possible. The usual practices include displaying prices in the local currency and unique copy with common phrases and expressions across regions.