Hreflang Tags: The Complete SEO Guide (2026)

Saar Twito9 min read
Saar Twito
Saar TwitoFounder & SEO Engineer

Hi, I'm Saar - a software engineer, SEO specialist, and lecturer who loves building tools and teaching tech.

View author profile →

What Is a Hreflang Tag?

A hreflang tag is an HTML attribute — <link rel="alternate" hreflang="en-US" href="..." /> — that tells Google which language and regional version of a page to serve to each user. It does not change rankings; it changes which URL gets shown in the search result. Hreflang is used by Google and Yandex only. Bing does not use it and instead reads <meta http-equiv="content-language">.

Key Facts (TL;DR)

  • Syntax: <link rel="alternate" hreflang="en-US" href="https://example.com/en-us/" /> — language code (ISO 639-1) optionally combined with a region code (ISO 3166-1 alpha-2).
  • Reciprocity is mandatory. Every variant must link to every other variant and to itself. Asymmetric hreflang (the "no return tags" error) is the most common hreflang issue reported by Google's International Targeting tooling.
  • Three valid placements: HTML <head>, XML sitemap (xhtml:link), or HTTP Link: response header. Pick one — mixing methods causes conflicts.
  • x-default is for unmatched users. Use hreflang="x-default" for the fallback URL shown when no language/region matches the user.
  • Each variant self-canonicalizes. A French page's canonical must point to itself, not to the English version. Pointing all variants to one canonical kills hreflang.
  • Google & Yandex only. Bing ignores hreflang and reads content-language meta or server signals instead.

Hreflang Syntax: Codes That Are Valid (and Codes That Aren't)

Hreflang values follow strict standards. Wrong codes are silently ignored by Google, which is why many implementations "look right" but do nothing. Language uses ISO 639-1 (two letters). Region uses ISO 3166-1 alpha-2 (two letters). The two are joined by a hyphen, not an underscore.

What you want to targetCorrect codeCommon mistake
English (any region)eneng, en_US
American Englishen-USen-us works, en_US does not
British Englishen-GBen-UK (UK is not a valid ISO code)
Brazilian Portuguesept-BRpt-BZ, br
European Portuguesept-PT or ptpor
Mexican Spanishes-MXes-MEX
Simplified Chinese (Mainland)zh-CNcn, chi
Traditional Chinese (Taiwan)zh-TWtw
Default / unmatched usersx-defaultdefault, en-default

Region without language is invalid. hreflang="US" on its own is silently dropped — you must always specify the language.

How to Implement Hreflang (Three Methods)

You have three places to declare hreflang. Pick the one that fits your stack and stick to it.

1. HTML <head> (most common)

Every variant page lists every variant — including itself — inside <head>:

<!-- Place on every variant page (en-US, en-GB, es-MX, fr-FR ...) -->
<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="es-MX" href="https://example.com/es-mx/" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

2. XML Sitemap

Best for large sites — declare all variants once per URL group:

<?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-us/</loc>
    <xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/en-us/" />
    <xhtml:link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/" />
    <xhtml:link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
  <url>
    <loc>https://example.com/es-mx/</loc>
    <xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/en-us/" />
    <xhtml:link rel="alternate" hreflang="es-MX" href="https://example.com/es-mx/" />
    <xhtml:link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/" />
    <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/" />
  </url>
</urlset>

3. HTTP Link: Header

Required for non-HTML files like PDFs:

Link: <https://example.com/en-us/whitepaper.pdf>; rel="alternate"; hreflang="en-US",
      <https://example.com/es-mx/whitepaper.pdf>; rel="alternate"; hreflang="es-MX",
      <https://example.com/whitepaper.pdf>; rel="alternate"; hreflang="x-default"

Hreflang and Canonical: The Interaction Most Sites Get Wrong

Hreflang and the canonical tag interact in a way that breaks many international sites. The rule: each variant must self-canonicalize. The French page's canonical points to the French URL, not the English one.

<!-- CORRECT: on /fr-fr/page -->
<link rel="canonical" href="https://example.com/fr-fr/page" />
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/page" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/page" />

<!-- WRONG: on /fr-fr/page -->
<link rel="canonical" href="https://example.com/en-us/page" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr-fr/page" />

In the wrong example, the canonical tells Google "the English page is the master" — so Google drops the French URL from its index, and hreflang has nothing left to swap in.

The 6 Mistakes That Break Hreflang

  1. Missing return tags (no reciprocity). Page A links to B, but B does not link back to A. Google treats both directives as invalid. Every variant must reference every other variant and itself.
  2. Invalid codes. en-UK instead of en-GB, pt-BZ instead of pt-BR, underscores instead of hyphens. Google silently ignores invalid codes.
  3. Canonical pointing at a different variant. All variants canonicalizing to the English page deindexes every other language.
  4. No self-referencing tag. Each page must include a hreflang link pointing to itself with its own code.
  5. Hreflang pointing to redirects or 404s. If /fr-fr/ redirects to /fr/, your hreflang must point at /fr/ directly. Redirect chains and 404s break the cluster.
  6. Mixing implementation methods. Hreflang in both the HTML head and the sitemap with different values causes conflicts. Pick one method per site.

x-default: When and How to Use It

hreflang="x-default"is the URL Google shows when no other variant matches the user's language or region. It is not the "default language" — it is the "none-of-the-above" fallback.

  • Use it on a global landing page (example.com/) that auto-detects language or shows a country selector.
  • Or point it at your most international variant — usually en or en-US.
  • Always include it on multilingual sites. Without x-default, users outside your declared regions get a guessed result.

How to Test and Audit Hreflang

Hreflang fails silently. You need to actively check it.

  • Google Search Console > Legacy tools > International Targeting. Reports the "No return tags" and "Unknown language code" errors directly from Google's index.
  • Screaming Frog SEO Spider. Configuration > Spider > Crawl Behaviour > check "Crawl hreflang". The Hreflang tab lists missing return links, missing self-references, and inconsistent codes across the whole site.
  • View source on a sample page. Confirm the page links to itself, links to all variants, and has a self-canonical.
  • Curl the URL. curl -I https://example.com/fr-fr/ — confirm 200 OK, not a redirect chain.
  • Search from the target locale. Use Google's &gl=fr&hl=fr URL parameters or a VPN to verify Google is returning the right variant.

FAQ

Do I need hreflang if I only have one language?

No. Hreflang only applies when you have two or more language or regional variants of the same content.

Is hreflang a ranking factor?

No. Hreflang does not boost rankings. It controls which already-ranking URL gets shown to a given user. The total visibility of your content does not change.

Can I use just en without a region?

Yes. hreflang="en" targets all English speakers regardless of country. Use language-only codes when content does not vary by region. Mix language-only and language-region codes carefully — Google picks the most specific match.

What happens if I link to a redirected URL in hreflang?

Google follows the redirect once but the cluster is considered weaker. Always point hreflang at the final 200-OK URL.

Does Bing use hreflang?

No. Bing reads <meta http-equiv="content-language" content="fr-FR"> and the Content-Language HTTP header, plus geotargeting in Bing Webmaster Tools. Yandex uses hreflang.

Can hreflang point to a different domain?

Yes. Cross-domain hreflang is supported — example.com can declare example.fr as its French variant. Reciprocity still applies: example.fr must link back.

How many variants can I declare?

There is no hard cap. Sites with hundreds of locales typically use the XML sitemap method because the HTML head approach gets unwieldy past ~10 variants.

Should I use hreflang for the same language with different currencies?

If the URL and content differ (e.g. /us/ in USD vs /ca/ in CAD, both English), yes — use en-US and en-CA. If only the price widget changes via JavaScript on the same URL, hreflang does not apply.

Conclusion

Hreflang is a routing instruction, not a ranking lever. Get the codes right, make every variant link reciprocally to every other variant including itself, give each variant its own self-canonical, and add an x-default. Validate in Search Console's International Targeting report and Screaming Frog. Most international SEO problems come down to one of the six mistakes above — fix those and Google will serve the right page to the right user.