Skip to content
Technical SEO & Indexingrel="alternate" hreflang

Hreflang Annotation

Definition

Hreflang is an HTML link attribute specification that informs search engines about the specific geographic region and language targeted by alternate localized versions of a webpage to serve the correct regional URL to users.

Why It Matters

Without accurate hreflang tags, search engines struggle to resolve language-specific content and may flag international variations as duplicate content. Correct hreflang ensures users in specific countries see localized content, currencies, and languages, improving international search rankings and conversion rates.

Hreflang Implementation & Bidirectional Rules

Criterion / StateRequirement / TargetStatus
Bidirectional ReciprocityPage A links to Page B, Page B must link to Page AOptimal
Self-Referential LinkPage must include a link to its own language URLOptimal
Default Fallbackhreflang='x-default' for unmatched international usersStandard

Practical Implementation Example

Hreflang elements must be reciprocal across all language clusters and point exclusively to canonical 200 OK URLs.

src/app/layout.tsx
<!-- HTML head bidirectional alternate link elements -->
<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/blog" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/blog" />
<link rel="alternate" hreflang="fr-fr" href="https://example.com/fr-fr/blog" />
<link rel="alternate" hreflang="x-default" href="https://example.com/blog" />
Automated Verification

How to Audit rel="alternate" hreflang in ScanWise

ScanWise checks hreflang implementation for self-referential links, return tag matching, valid ISO language/region codes, and canonical consistency.

Audit your hreflang configuration in ScanWise

Common rel="alternate" hreflang Mistakes & How to Fix Them

Common rel="alternate" hreflang Mistakes & How to Fix Them
MistakeWhy It HurtsThe Fix
Missing reciprocal (return) hreflang tags on localized target pages.If Page A points to Page B, but Page B does not point back to Page A, Google invalidates the entire annotation.Ensure all alternate localized templates dynamically render the complete set of mutual regional URLs.
Using invalid country codes (e.g. using 'uk' instead of the ISO 3166-1 alpha-2 code 'gb').Search engines reject unrecognized locale identifiers, causing localized rankings to fail.Always combine valid ISO 639-1 language codes with ISO 3166-1 alpha-2 country codes (e.g., 'en-gb', 'es-mx').