Technical SEO

Hreflang: Complete Guide to International SEO

Hreflang: international SEO guide

The hreflang attribute is the foundation of multilingual SEO. Without it, Google shows the wrong page version to the wrong user. We cover syntax, architecture, common mistakes, and verification tools.

Hreflang is an HTML attribute that tells search engines which language and region each page version is intended for. Google uses this data to show users the version of content that matches their language and geography.

Without hreflang, Google tries to guess the right version on its own — and often gets it wrong: a Russian-speaking user gets the English page, and a German user sees the French version. This reduces CTR, increases bounce rate, and costs conversions.

Hreflang ties language versions together with reciprocal links — every page must explicitly point to all the others.
Hreflang affects which version of the page is shown to the user, but not rankings directly. Google doesn't penalise its absence, but without it you lose relevance in search results.

What is hreflang

How hreflang connects multilingual website versions.

The hreflang attribute was introduced in 2011 — Google created it to solve the duplicate content problem on international websites. If a page /about exists as /en/about, /de/about and /fr/about, Google should not treat them as duplicates — each serves a separate audience.

2011

Year introduced

Google introduced hreflang for multilingual sites

179+

Region codes

ISO 3166-1 alpha-2 codes supported by Google

100%

Reciprocity

All page versions must link to each other

≤ 10ms

Speed impact

Correctly implemented hreflang doesn't slow the site

Hreflang is only supported by Google and Yandex. Bing uses the Content-Language meta tag and HTTP headers, but works with URL structure and geo-targeting through Webmaster Tools. If your audience includes Russian-speaking users, hreflang is still needed for Yandex to work correctly.

When to use hreflang

Not every multilingual site needs hreflang — it's important to understand when the attribute actually solves a problem.

SituationNeed hreflangNotes
One language, different countries (en-US, en-GB)YesDifferent content (prices, spelling, promotions)
Different languages (en, de, fr)YesPrimary hreflang use case
One language, one regionNoNo need to duplicate links to self
Content identical across all language versionsNoUse canonical instead
Partial translation (70%+ of content)YesEven partial translations need markup
Machine translation without editingNoGoogle may treat this as spam
If the content of two page versions is completely identical (e.g., /en-us/ and /en-gb/ with no differences), it's better to use canonical rather than hreflang.

Syntax and formats

Hreflang uses codes from two standards: ISO 639-1 for language and ISO 3166-1 alpha-2 for region. Format: language or language-REGION.

HTML
<!-- Language only -->
<link rel="alternate" hreflang="ru" href="https://example.com/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />

<!-- Language + region -->
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/" />
<link rel="alternate" hreflang="en-GB" href="https://example.com/en-gb/" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/" />
<link rel="alternate" hreflang="fr-CA" href="https://example.com/fr-ca/" />

<!-- x-default: page for users without a matching locale -->
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Region in hreflang is always written in uppercase (en-GB, fr-CA), language in lowercase (en, fr). Many implementations use lowercase throughout — Google understands both, but following the canonical format is good practice.

CodeMeaning
ruRussian (any region)
enEnglish (any region)
en-USEnglish for the United States
en-GBEnglish for the United Kingdom
de-ATGerman for Austria
zh-HansSimplified Chinese
zh-HantTraditional Chinese
x-defaultPage for undefined region/language

Implementation methods

Hreflang can be implemented in three ways. The choice depends on the site's technology and scale.

1. HTML tag in the head section

The most common method. <link rel="alternate" hreflang="..."> tags are added to the <head> of each page. Crucially: all versions of the page must link to all other versions, including themselves.

HTML
<!-- Page /en/about — links to ALL versions -->
<head>
  <link rel="alternate" hreflang="en" href="https://example.com/en/about/" />
  <link rel="alternate" hreflang="ru" href="https://example.com/about/" />
  <link rel="alternate" hreflang="de" href="https://example.com/de/about/" />
  <link rel="alternate" hreflang="x-default" href="https://example.com/en/about/" />
  <link rel="canonical" href="https://example.com/en/about/" />
</head>

2. HTTP Link header

For PDFs, images, and other non-HTML resources, HTTP headers are used. This method also works for any page but requires server configuration.

NGINX
# Nginx: add hreflang via HTTP headers
add_header Link '</en/about/>; rel="alternate"; hreflang="en", </about/>; rel="alternate"; hreflang="ru", </de/about/>; rel="alternate"; hreflang="de"';

3. XML Sitemap

The optimal approach for large sites (10,000+ pages). All hreflang relationships are described in the sitemap — this reduces HTML bloat and centralises management.

XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://example.com/en/about/</loc>
    <xhtml:link rel="alternate" hreflang="en"
                href="https://example.com/en/about/"/>
    <xhtml:link rel="alternate" hreflang="ru"
                href="https://example.com/about/"/>
    <xhtml:link rel="alternate" hreflang="de"
                href="https://example.com/de/about/"/>
    <xhtml:link rel="alternate" hreflang="x-default"
                href="https://example.com/en/about/"/>
  </url>
</urlset>
Do not mix methods: if hreflang is implemented in HTML, don't also add it to the sitemap — Google will process both sources, which can create conflicts.

x-default: language selector page

The x-default value designates the page for users whose language or region doesn't match any of the declared alternatives. Google shows this version when no matching hreflang exists.

  • Language selector page — the user lands on /choose-language/ and selects their version
  • Main site version — most often the English version or whichever Google should show by default
  • Homepage — if the site has several languages, x-default points to /
x-default is not required, but Google strongly recommends adding it. Without it, users without a matching locale get whatever version happens to appear in the index.

Canonical + hreflang

Canonical and hreflang solve different problems but work together. The rule is simple: canonical always points to itself (self-referencing canonical) when hreflang is present on the page.

HTML
<!-- CORRECT: canonical points to self + hreflang covers all versions -->
<link rel="canonical" href="https://example.com/en/about/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/about/" />
<link rel="alternate" hreflang="ru" href="https://example.com/about/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/about/" />

<!-- WRONG: canonical points to a different language version -->
<link rel="canonical" href="https://example.com/ru/about/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/about/" />

If the canonical of the English page points to the Russian version, Google will treat the English page as a duplicate and won't include it in the index. That's why hreflang without a self-referencing canonical is essentially useless.

Common mistakes

According to audit data, around 60% of sites with hreflang have at least one critical error. Here are the most common ones.

Mistake 1: missing reciprocal links

The most common problem. Page A links to page B via hreflang, but page B doesn't link back to page A. Google ignores such hreflang — it's invalid without reciprocity.

Mistake 2: incorrect language codes

  • hreflang="en_US" with underscore instead of hyphen — invalid code
  • hreflang="english" — a word instead of an ISO code
  • hreflang="zh" instead of hreflang="zh-Hans" or hreflang="zh-Hant" — Chinese requires a script specifier
  • hreflang="ru-RU" instead of hreflang="ru" — unnecessary region code for a language without dialects

Mistake 3: hreflang on non-indexable pages

If a page is blocked in robots.txt or tagged with noindex, hreflang for it is pointless. Google won't process hreflang on pages it cannot index.

Mistake 4: automatic language-based redirects

Some sites redirect users based on browser language: a Russian visitor requests /about/ and gets redirected to /ru/about/. Google sees a 301 redirect and can't correctly process hreflang. Solution: serve content without redirecting, use JavaScript switching or cookies.

Mistake 5: hreflang links pointing to 404s or redirects

Hreflang must point to final, canonical URLs. Links through redirects or to 404 pages invalidate the attribute for that version.

Verification tools

ToolWhat it checksCost
Google Search ConsoleHreflang errors in International Targeting reportFree
Aleyda Solis hreflang toolTag validity for a single page, link reciprocityFree
TechnicalSEO hreflang checkerBatch checking, error exportFree / paid
Screaming FrogFull crawl with hreflang analysisPaid
Ahrefs Site AuditHreflang errors within SEO auditPaid
Semrush Site AuditDedicated hreflang reportPaid

FAQ

No — hreflang is not a direct ranking factor. It affects which version of the page is shown to a specific user, but not the position in the SERP. However, correct implementation indirectly improves metrics: bounce rate drops, time-on-site and conversion grow, because users see the version relevant to them.
Only pages that have counterparts in other languages. Service pages (login, checkout, API routes), pages with noindex, and pages without language equivalents don't need hreflang.
Google will try to follow the redirect, but the result is unpredictable. Some hreflang parsers stop at the intermediate URL. Always point to the final canonical URL without redirects.
Yes — this is even the preferred approach for large sites. Google officially supports both methods. The key is not to use both simultaneously on the same pages.
Usually from a few days to a few weeks — depends on the site's crawl frequency. To speed things up: add a sitemap with hreflang to Google Search Console and request reindexing for key pages.