What Hreflang Does: Locale Signals, Canonicals, and Common Failure Modes
Hreflang is a link annotation that declares language or language-and-region alternatives of a page so Google can choose a more appropriate localized URL for a searcher. It is not a language detector, canonical directive, ranking boost, redirect, or substitute for crawlable localized URLs with visible content in the intended language.
There is no hreflang formula. A working implementation is a graph: each localized URL names itself and the appropriate alternatives with supported codes and fully qualified URLs; the related pages return the relationship; the targets are crawlable and indexable; and their canonical signals do not contradict the cluster.
Google says it uses algorithms and visible page content—not the HTML lang attribute or hreflang itself—to determine language. The lang attribute still matters for browsers and accessibility; it simply performs a different job.
Hreflang maps alternatives
Google’s localized-version documentation supports three equivalent implementation methods: HTML link elements, HTTP Link headers, and XML sitemaps. Choose the one the publishing system can generate and validate reliably. Duplicating all three adds maintenance work without a Google Search benefit.
An HTML cluster could look like this:
<link rel="alternate" hreflang="en" href="https://example.com/en/page" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/page" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/language-selector" />
Every version should emit the applicable set, including itself. Google requires fully qualified URLs. A generic language code such as en can catch English speakers outside the region-specific variants; x-default handles a language-or-region-neutral fallback.
Hreflang and canonical solve different problems
Canonicalization tells Google which URL is preferred among duplicate or highly similar versions. Hreflang tells Google which URLs are localized alternatives. They can coexist, but they should not issue contradictory instructions.
For separately indexable translations or regional pages, the practical pattern is usually a self-referential canonical on each localized URL plus hreflang links among the equivalents. Google’s canonical guidance says a page using hreflang should specify a canonical in the same language, or the best substitute language if one does not exist.
Canonicalizing every locale to one global URL can remove the separately indexable alternatives that hreflang is meant to select. Hreflang cannot reliably rescue a target that the canonical cluster tells Google to consolidate elsewhere.
Google may still choose a different canonical because canonical declarations are signals, not commands. Use URL Inspection to compare the user-declared and Google-selected canonical, then inspect content, redirects, sitemaps, internal links, and server behavior rather than changing hreflang in isolation.
Language, region, and x-default are separate choices
Use an ISO 639-1 language code such as fr. Add an ISO 3166-1 alpha-2 region only when the page truly targets a regional variant, such as en-gb. Region alone is not a valid hreflang value, and the code does not prove the content is localized.
If the site has several regional English pages, a generic en version can serve speakers outside those named regions. An x-default URL can point to a language selector or neutral fallback. Google’s x-default explanation also notes that URLs in hreflang annotations may aid discovery, but discovery does not guarantee indexing or selection.
Do not assume every page needs every locale. Google permits partial site coverage and says reciprocal relationships among the included pages can still be processed. The publishing contract should define what happens when a translation is missing, retired, redirected, or temporarily unavailable.
Common failure modes are graph or URL failures
| Failure | Why it matters | Evidence to inspect |
|---|---|---|
| Missing return link | The relationship is not reciprocal, so Google may ignore it | Rendered annotation sets on both URLs |
| Missing self-reference | The cluster is incomplete and harder to validate consistently | Each page’s own code in its set |
| Relative or malformed target | Google requires fully qualified alternate URLs | Parsed URL and final resolved URL |
| Redirecting alternate | The annotation names an intermediate URL rather than the intended page | HTTP status and redirect chain |
| Non-indexable or blocked target | The alternate cannot participate as intended | Robots, response, meta robots, and rendered page |
| Cross-language canonical | Canonical consolidation conflicts with separate localized selection | Declared and Google-selected canonical |
| Inconsistent sets | Pages describe different cluster membership | Graph diff across every variant |
| Wrong code or mixed template data | The tag targets the wrong language, region, or route | Code validation plus visible content review |
| Client-only or malformed head markup | Search engines may not receive a stable annotation | Raw HTML, rendered DOM, and HTML validation |
Automatic redirects introduce another risk. Google’s international-site guidance recommends letting users switch languages and warns that redirecting based on an assumed locale can prevent users and crawlers from accessing all versions.
Audit the live graph, not the template intention
Freeze the expected cluster
For one canonical content identity, list every live localized URL, its language or region code, generic-language fallback, and x-default target.
Fetch every target
Record final URL, status, indexability, visible language, declared canonical, and whether the expected alternate set appears in the raw or rendered implementation.
Validate reciprocity and self-reference
Treat URLs as graph nodes and hreflang links as directed edges. Identify missing return edges, missing self-edges, unexpected nodes, and inconsistent codes.
Compare canonical signals
Confirm each localized page’s canonical intent, sitemap presence, and internal links agree. Inspect Google’s selected canonical for representative URLs.
Test lifecycle events
Simulate a missing translation, redirect, retirement, and new locale. Verify that the generator removes stale edges and preserves valid reciprocal relationships.
Hreflang is routing metadata, not localization strategy
Correct annotations cannot make untranslated main content useful, repair inconsistent inventory or pricing, choose the right legal terms, or guarantee that searchers see a particular URL. They give Google a coherent alternate set from which to select. The underlying pages still need to be accessible, visibly localized, internally linked, and governed through their lifecycle.
Sources
- Google Search Central, “Tell Google about localized versions of your page”
- Google Search Central, “How to specify a canonical URL with rel=canonical and other methods”
- Google Search Central, “Fix canonicalization issues”
- Google Search Central Blog, “How x-default can help you”
- Google Search Central, “Managing multi-regional and multilingual sites”
Continue the evidence path
Related reading
Read first
Search Engine Optimization Demand Map: What 829,491 Competitor Rows Reveal
Place localized URL signals within crawlability, indexability, and search-result selection.
Related
robots.txt for AI Crawlers: Build an Allow/Block Policy Bot by Bot
Avoid blocking localized URLs that search engines must crawl to understand the alternate graph.
Related
Video SEO for Lean Teams: Choose Which Buyer Questions Deserve Production
Apply the same discipline of crawlable pages, visible content, and explicit metadata to another search surface.