Glossary

What Is Hreflang? Definition and Why It Matters for International SEO

Published: 2026-03-225 min readv1.0

Definition

Hreflang is an HTML link attribute (rel="alternate" hreflang="x") that tells search engines which language and regional version of a page to display to users in different locations. It prevents duplicate content issues between language variations of the same page and ensures that a user in Germany sees the German version while a user in France sees the French version. Hreflang is essential for any website that serves content in multiple languages or targets multiple countries.

Why It Matters

For any business operating across multiple languages or countries, hreflang is one of the most important — and most commonly misconfigured — technical SEO elements.

  • Serves the right content to the right user. Without hreflang, Google may show your English page to French-speaking users, or your UK-specific pricing page to users in Australia. Hreflang ensures each user sees the version meant for them.
  • Prevents duplicate content penalties. If you have the same content in English at /en/shoes and /us/shoes, Google may see these as duplicates and pick one to index — possibly the wrong one. Hreflang signals that these are intentional regional variants, not duplicates.
  • Consolidates ranking signals. Hreflang helps search engines understand that language variants are related. Instead of splitting authority across multiple versions, signals are attributed to the correct regional variant.
  • Improves click-through rates. Users are more likely to click on and engage with content in their own language. Proper hreflang implementation can increase organic CTR by 20-30% in multilingual markets.
  • AI citation accuracy. AI models increasingly consider user language and location when retrieving sources. Proper hreflang helps AI retrieval systems identify and cite the correct language version, preventing situations where an AI response includes a link to a page in the wrong language.

For a broader understanding of technical optimization, see our technical SEO overview.

How It Works

Hreflang can be implemented in three ways, each suited to different technical setups.

Method 1: HTML link tags (most common)

Add <link> tags in the <head> section of each page:

<link rel="alternate" hreflang="en" href="https://example.com/en/page" />
<link rel="alternate" hreflang="de" href="https://example.com/de/page" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />

Method 2: HTTP headers

For non-HTML content (PDFs, documents):

Link: <https://example.com/en/page>; rel="alternate"; hreflang="en",
      <https://example.com/de/page>; rel="alternate"; hreflang="de"

Method 3: XML sitemap

Add hreflang annotations directly in your sitemap using the xhtml:link element:

<url>
  <loc>https://example.com/en/page</loc>
  <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/page"/>
  <xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/page"/>
  <xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/page"/>
</url>

Key rules

  • Self-referencing is required. Every page must include an hreflang tag pointing to itself. If your English page declares German and French alternates, it must also declare itself as the English alternate.
  • Return tags are required. If page A references page B as an alternate, page B must reference page A back. Unreciprocated tags are ignored by Google.
  • Use x-default. The x-default value specifies the fallback page for users whose language or region does not match any of your defined variants. This is typically your main language version or a language-selection page.
  • Use correct codes. Language codes follow ISO 639-1 (two-letter: en, de, fr). Country codes follow ISO 3166-1 Alpha-2 (US, GB, DE). Combined format: en-US, de-AT, pt-BR.
  • Every variant needs annotations. If you have 5 language versions, each page needs 5 hreflang tags (including itself). This scales quickly — a site with 1,000 pages and 5 languages needs 25,000 hreflang annotations.

Common mistakes

  • Missing self-referencing tags — The single most common error. Every page must reference itself.
  • Missing return tags — All references must be bidirectional.
  • Wrong language codes — Using uk for Ukrainian (correct: uk) but confusing it with United Kingdom (en-GB). Using jp instead of ja for Japanese.
  • Pointing to redirected URLs — Hreflang URLs must resolve to a 200 status code, not a redirect.
  • Pointing to noindex pages — Hreflang tags on noindexed pages create conflicting signals.
  • Inconsistency with canonical tags — The canonical URL and hreflang URL for a page must match.

Hreflang and AI visibility

AI assistants like ChatGPT and Gemini increasingly tailor responses to the user's language. When an AI retrieves sources for a German-speaking user, proper hreflang helps ensure it finds and cites your German content rather than defaulting to the English version. This is particularly important for businesses targeting multiple European markets or serving content in languages like Spanish that span many countries.

For more on technical foundations, explore our guide on SEO fundamentals.

Frequently Asked Questions

What is the correct format for hreflang tags?

Hreflang uses ISO 639-1 language codes (e.g., en, de, fr) optionally combined with ISO 3166-1 Alpha-2 country codes (e.g., en-US, en-GB, pt-BR). The format is: <link rel="alternate" hreflang="en-US" href="https://example.com/en-us/page">. Every page must include a self-referencing hreflang tag and an x-default tag pointing to the fallback version for unmatched languages or regions.

Does hreflang affect AI-generated answers?

Indirectly, yes. AI models using web retrieval consider the user's language and location when selecting sources. Correct hreflang implementation helps AI retrieval systems find the appropriate language version of your content. Without hreflang, an AI might cite your English page to a user asking in German, or your content could compete with its own translations for the same AI citation.

What are common hreflang implementation mistakes?

The most frequent errors are: missing self-referencing tags (every page must include its own hreflang), missing return tags (references must be reciprocal), incorrect language or country codes, omitting the x-default fallback tag, and pointing hreflang tags to redirected or noindexed URLs. Google Search Console reports hreflang errors in the International Targeting section — check it regularly.

Is your multilingual site visible to AI?

Technical misconfigurations can hide your content from AI in every language. Check your AI readiness now.

Scan My Website Free →

Free scan -- No signup required

hreflanghreflang taginternational SEOmultilingual SEOlanguage targeting