What is hreflang: a complete guide with examples of errors

In this article: what is hreflang in simple terms, how to implement it for different URL structures, a table of language and region codes, differences for Google and Yandex, typical errors, a checklist, and answers to frequently asked questions.
Hreflang is an HTML attribute that tells search engines which pages on a site are translations of each other and for which language or region each version is intended. Simply put: it's a way to tell Google and Yandex "this page is in Russian for Russia, and this one is in German for Germany, don't show them instead of each other."
Without hreflang, a multilingual site leaves the choice of version to the search engine. If pages in different languages have the same structure and meaning, the search engine may consider them duplicates and leave only one in the search results — usually not the one a specific user needs. Properly configured hreflang removes this uncertainty and separates versions by language and regional segments of the search results.

What is hreflang and why is it needed

hreflang is a rel="alternate" link attribute that tells the search engine which URLs are language or regional variants of the current page.
Without hreflang, the search engine may:
  • Show the Russian version to users from Germany
  • Consider translations as duplicate content and merge them into one document
  • Not show regional versions in corresponding local search results
With hreflang, the search engine knows: this is the German page for Germany, this is the French page for France, and this is the English page for everyone else. It can be used to specify different versions for the same language but different regions, and also to specify multiple languages for one country — for example, English and French for Canada (en-CA and fr-CA). This is important for localization: in Canada, even for French language, prices are indicated in Canadian dollars, while in France they are in euros.

How hreflang looks

The attribute is added to the <head> section of each page:
<link rel="alternate" hreflang="ru" href="https://mysite.com/ru/about/" />
<link rel="alternate" hreflang="en" href="https://mysite.com/en/about/" />
<link rel="alternate" hreflang="de" href="https://mysite.com/de/about/" />
<link rel="alternate" hreflang="x-default" href="https://mysite.com/en/about/" />
Key parts:
  • rel="alternate" — indicates that this is an alternative version of the page
  • hreflang="ru" — language code according to ISO 639-1
  • href — the full absolute URL of the version (with protocol and domain)
  • hreflang="x-default" — the default version if no other is suitable

Table: common language and region codes

Attribute format: language or language-COUNTRY. Here are the codes that are most often mistaken:
Code
Value
ru
Russian (any region)
ru-RU
Russian, Russia
en
English (any region)
en-US
English, USA
en-GB
English, Great Britain
de
German
fr
French
fr-CA
French, Canada
kk
Kazakh (not kz — this is a country code, not a language)
hy
Armenian (not am — also a region code)
uz
Uzbek
x-default
default version
The country code is added only if the content for one language differs in different regions.
  • Language only — hreflang="en" — for all English-speaking users regardless of country
  • Language + country — hreflang="en-US" for the USA, hreflang="en-GB" for Great Britain — for example, prices in dollars versus pounds
  • If the content is the same for all speakers of a language, the language code without the country is sufficient

Reciprocity: the most frequently violated rule

Each page must contain hreflang for all language versions, including itself (self-referencing). This is a critical rule: if you have three languages, each version must link to all three, including itself. This creates a closed set of links, through which the search engine understands the relationship between the versions.
Correct: the Russian page has links to the German, English, and itself. The German page has links to the Russian, English, and itself. The English page has links to the Russian, German, and itself.
Incorrect: the Russian and German versions have links to the English one, but the English version does not have reciprocal links. The search engine considers such an implementation incorrect and may ignore the entire set.
<!-- Example of a correct hreflang set -->
<link rel="alternate" hreflang="de" href="https://mysite.com/de/about/" />
<link rel="alternate" hreflang="ru" href="https://mysite.com/ru/about/" />
<link rel="alternate" hreflang="en" href="https://mysite.com/en/about/" />
<link rel="alternate" hreflang="x-default" href="https://mysite.com/en/about/" />

x-default: version for others

hreflang="x-default" — a special value for a page that is shown when no other version is suitable for the user. This is usually the main language version of the site (most often Russian or English).
If you have Russian and Kazakh versions without an English one, x-default can be specified for one of them — or not used at all. This is not a mandatory attribute, but it is recommended by Google.

Implementation Options

In addition to tags in the <head>, hreflang can be specified:
Via HTTP headers. For PDFs and other non-HTML resources, this is the only option.
Via sitemap. Instead of attributes on each page — one sitemap, in which for each link, variants of the same page in other languages are listed. Convenient for large sites on Google's side.
All options are equivalent for Google — choose the one that is easier to maintain. By the way, Multify automatically adds the necessary meta tags both to the HTML code of pages and to the sitemap.

Important distinction: Google and Yandex process hreflang differently

Most Russian-language guides on hreflang are written with only Google in mind — but for sites targeting the Russian internet and CIS, this is only half the picture.
  • Google supports all three markup methods: HTML tags in <head>, HTTP headers, and hreflang in XML Sitemap.
  • Yandex has stopped supporting hreflang via XML Sitemap. The only reliable way to specify language and regional versions for Yandex is HTML tags <link rel="alternate" hreflang="..."> directly in the <head> of each page.
Practical conclusion: if you have an audience in Yandex (Russia, Kazakhstan, Belarus), do not rely on the sitemap implementation — it will work for Google, but will not be effective in Yandex. The tag in <head> is the only option that works equally well in both systems.

Don't want to write hreflang manually?

Multify automatically generates hreflang for all pages when any language is added — both in HTML and in the sitemap.

Typical Errors

According to Ahrefs research (374,756 domains), 67% of websites using hreflang have at least one implementation error.

Error 1: No reciprocal links

The most common mistake. Check: does each page of each version contain hreflang to all other versions? If not, search engines may incorrectly interpret the site structure and not consider the markup at all.

Error 2: Incorrect or relative URL

hreflang requires an absolute URL with a protocol: https://mysite.com/en/about/, not /en/about/. Relative paths do not work. Consistency is also important: if the canonical URL has a trailing slash (/about/), then hreflang must also have a slash — and vice versa.

Error 3: hreflang points to a non-canonical URL

If the target page itself is marked rel="canonical" to another URL, the search engine may ignore it as an alternative version. hreflang must strictly point to the canonical address of each version, not to a duplicate or parameterized URL.

Error 4: Non-existent version

The hreflang points to a non-existent page — for example, not all products are translated, but attributes are specified for all. The search engine will find a 404 and ignore the non-matching block. If a page does not have a translation, do not specify hreflang for it at all.

Error 5: Duplication on one page

Two attributes with the same hreflang on one page — for example, due to plugin conflicts or manual markup editing. Google takes the first one and ignores the second; the outcome is unpredictable.

Error 6: Incorrect language code

hreflang="kk" is the correct code for the Kazakh language (according to ISO 639-1 list). You cannot use kz — this is a country code, not a language code. The same mistake applies to Armenian: hy is the language code, am is the region code.

Error 7: hreflang on a redirect or blocked page

If a page with hreflang returns a 301 redirect, the search engine follows it and loses the attribute — hreflang must be on the final page, not on an intermediate one. The same applies to URLs blocked in robots.txt, or non-indexable pages (noindex): hreflang on them is not taken into account.

How to Check Hreflang

Hreflang Testing Tool. Shows errors: incorrect attributes, missing backlinks. The downside is that pages need to be uploaded manually.
Screaming Frog or Ahrefs. Scans the entire site. Screaming Frog scans up to 500 URLs for free and shows all hreflang attributes with reciprocity checks.
Google Search Console in the "International Targeting" section (for domains confirmed as Domain property) shows some hreflang errors, but does not replace a full-fledged crawler.

Hreflang Pre-Publication Checklist

  • Each version links to itself and to all other versions (reciprocity)
  • All URLs are absolute, with protocol and consistent slashes
  • hreflang points to a canonical, indexable, 200-returning URL
  • Language codes comply with ISO 639-1, country codes with ISO 3166-1 (do not confuse kk/kz, hy/am)
  • There is x-default for users outside the specified languages/regions
  • For Yandex, the markup is duplicated with tags in <head>, not just in the sitemap

hreflang and Tilda

Tilda does not add hreflang on its own. The options are effectively limited:
Manually via an HTML block. Add <link> tags to a code block. If the site structure changes, update manually. Not suitable for dynamic catalog pages or blogs. Acceptable for small websites.
Via Multify. The proxy automatically generates hreflang for all pages of all language versions, including products and blog articles. When a language is added, attributes appear everywhere immediately, reciprocity is automatically maintained — and the markup works correctly for both Google and Yandex.
Manually maintaining hreflang on a website with 50 pages and 3 languages means 150 sets of attributes. Each time a page or language is added, it requires updates across all versions. Automation completely solves this.

Add hreflang without manual work

Try Multify with automatic hreflang generation for any website changes — with support for both Google and Yandex.

Ready to set up hreflang correctly the first time?

Multify automatically sets the correct hreflang for all language versions of a Tilda website — with support for Google and Yandex, without manual markup and the risk of errors from the checklist above.

Frequently Asked Questions

Is Hreflang the same as website translation?
No. Hreflang does not translate content or create language versions; it only tells the search engine which existing pages are linked as versions of each other. First, you need translated content on separate URLs, then hreflang to link them.
Is hreflang needed if a website only has one language?
No, as long as the content and audience completely match. Hreflang becomes necessary as soon as a second language or regional version of the same page appears.
Can hreflang be used without x-default?
Yes, it's an optional attribute. But without it, users whose language doesn't match any version will get a default version chosen by the search engine, not the one you would have chosen.
How to check if hreflang works in Yandex?
In Yandex.Webmaster, the indexing section shows which language versions of pages have been indexed. If hreflang is marked only in the sitemap and not with tags in the page's source code, Yandex will not take it into account.
How to set up hreflang on a Tilda website?
Tilda does not have a built-in hreflang mechanism between separate projects or language blocks. Tags can be manually written in the settings of each page or through a proxy, where hreflang for all versions is generated automatically. How this works is shown on the Multify homepage.

Connect Multify to Your Website

Your answers will help us understand how best to connect your website

Website Type
Number of Pages
Monthly Website Traffic
Preferred Contact Method *