Hreflang is an HTML attribute that tells search engines which pages on a website 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 that 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 search engines which URLs are language or regional variants of the current page.
Without hreflang, a search engine can:
- Show the Russian version to users from Germany
- Consider translations as duplicate content and merge them into one document
- Do not show regional versions in corresponding local search results
With hreflang, the search engine knows: this page is in German for Germany, this one in French for France, and this English one is for everyone else. It can be used to specify different versions for the same language but different regions, as well as 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 in French, prices are indicated in Canadian dollars, while in France they are in euros.
What hreflang looks like
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 — full absolute URL of the version (with protocol and domain)
- hreflang="x-default" — default version if no other matches
Table: common language and region codes
Attribute format: language or language-COUNTRY. Here are the codes that are most often mistaken:
Country codes are added only if the content for one language differs in different regions.
- Only language — 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 native speakers, the language code without the country is sufficient
Reciprocity: The Most Frequently Violated Rule
Each page must contain hreflang tags 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 one does not have reciprocal links. The search engine considers this 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" is a special value for the page that is shown when no other version is suitable for the user. This is usually the version in the site's primary language (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 <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, a single sitemap lists variants of the same page in other languages for each link. Convenient for large sites on Google's side.
All variants are equally valid for Google — choose the one that is easier to maintain. By the way, Multify automatically adds the necessary meta tags to both the HTML code of pages and the sitemap.
Important distinction: Google and Yandex process hreflang differently
Most Russian-language hreflang guides 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.
Common Mistakes
According to Ahrefs research (374,756 domains), 67% of websites using hreflang have at least one implementation error.
Error 1: No Return 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-corresponding 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, ignores the second; the result is unpredictable.
Error 6: Incorrect language code
hreflang="kk" is the correct code for the Kazakh language (according to the 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 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 website. 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 Checklist Before Publishing
- 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-status URL
- Language codes comply with ISO 639-1, country codes with ISO 3166-1 (do not confuse kk/kz, hy/am)
- There is an x-default for users outside the specified languages/regions
- For Yandex, the markup is duplicated with tags in <head>, not only in the sitemap
hreflang and Tilda
Tilda does not add hreflang on its own. The options are actually limited:
Manually via HTML block. Add <link> tags to the code block. If the site structure changes, update manually. Not suitable for dynamic catalog or blog pages. 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 immediately appear everywhere, 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 addition of a page or language requires updating all versions. Automation completely eliminates this.
Frequently Asked Questions about hreflang
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 versions of each other. First, you need translated content on separate URLs, and then hreflang to link them.
Is hreflang needed if a website has only one language?
No, if the content and audience are completely the same. It is needed as soon as a second language or regional version of the same page appears.
Does hreflang directly affect search rankings?
No, hreflang is not a ranking factor in itself. It affects which version of the page is shown to a specific user and prevents loss of visibility due to content duplication between language versions.
Can hreflang be used without x-default?
Yes, it is an optional attribute. But without it, users whose language does not match any version will receive the default version, arbitrarily chosen by the search engine, and not the one you would choose yourself.
How to quickly check if hreflang works for Yandex?
Via Yandex.Webmaster: the indexing section will show which language versions of pages have been indexed. If hreflang is marked up only in the sitemap and not with tags in <head>, Yandex will not take it into account — check the page's source code.