Technical SEO
Hreflang: Complete Guide to International SEO

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.
What is hreflang
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.
Year introduced
Google introduced hreflang for multilingual sites
Region codes
ISO 3166-1 alpha-2 codes supported by Google
Reciprocity
All page versions must link to each other
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.
| Situation | Need hreflang | Notes |
|---|---|---|
| One language, different countries (en-US, en-GB) | Yes | Different content (prices, spelling, promotions) |
| Different languages (en, de, fr) | Yes | Primary hreflang use case |
| One language, one region | No | No need to duplicate links to self |
| Content identical across all language versions | No | Use canonical instead |
| Partial translation (70%+ of content) | Yes | Even partial translations need markup |
| Machine translation without editing | No | Google may treat this as spam |
/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.
<!-- 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.
| Code | Meaning |
|---|---|
| ru | Russian (any region) |
| en | English (any region) |
| en-US | English for the United States |
| en-GB | English for the United Kingdom |
| de-AT | German for Austria |
| zh-Hans | Simplified Chinese |
| zh-Hant | Traditional Chinese |
| x-default | Page 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.
<!-- 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: 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 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>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
/
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.
<!-- 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 codehreflang="english"— a word instead of an ISO codehreflang="zh"instead ofhreflang="zh-Hans"orhreflang="zh-Hant"— Chinese requires a script specifierhreflang="ru-RU"instead ofhreflang="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
| Tool | What it checks | Cost |
|---|---|---|
| Google Search Console | Hreflang errors in International Targeting report | Free |
| Aleyda Solis hreflang tool | Tag validity for a single page, link reciprocity | Free |
| TechnicalSEO hreflang checker | Batch checking, error export | Free / paid |
| Screaming Frog | Full crawl with hreflang analysis | Paid |
| Ahrefs Site Audit | Hreflang errors within SEO audit | Paid |
| Semrush Site Audit | Dedicated hreflang report | Paid |