Technical SEO

Hreflang Tags: What They Are and Why Most Implementations Fail

By Alex··9 min read
Hreflang Tags: What They Are and Why Most Implementations Fail

Key Takeaways

  • Hreflang annotations are hints — Google ignores them when the implementation is internally inconsistent
  • Every hreflang reference must be bidirectional: if page A points to page B, page B must point back to page A
  • Three implementation methods exist (HTML link elements, HTTP headers, XML sitemaps) with different scalability ceilings
  • A 2023 Ahrefs study found 67% of domains using hreflang had at least one error severe enough to reduce or eliminate effectiveness

A German ecommerce team launches their French storefront. Within three weeks, Google starts serving French product pages to English-speaking users in the US, while French shoppers see German originals. Revenue drops across both markets. The root cause: hreflang tags that pointed in one direction but never confirmed the relationship back.

Hreflang is the only HTML mechanism that explicitly tells search engines which language-and-region version of a page to show which audience. Without it, search engines guess — using URL patterns, on-page language detection, and server location as proxy signals. Those guesses fail regularly on multilingual sites because the signals conflict. A .de domain serving English content. A /fr/ subdirectory containing machine-translated text that still has English metadata. Google sees mixed signals and picks whichever version it indexed first.

The markup itself is deceptively simple. Getting it to actually work at scale is where the failure rate climbs to two-thirds of all implementations.

Without Explicit Signals, Search Engines Serve the Wrong Version

Google's Search Central documentation states that hreflang annotations are "hints, not directives." This means Google can — and does — override them when other signals contradict the markup. But the inverse is more damaging: without hreflang annotations at all, Google relies on signals that routinely misfire for multilingual sites.

The fallback signals Google uses when no hreflang exists:

SignalWhat Google infersWhere it breaks
ccTLD (.de, .fr, .jp)Page targets that countryEnglish content on a .de domain; global brands using .com for all markets
Subdirectory path (/fr/, /de/)Page targets that languagePartially translated sites where /fr/ pages still have English metadata or navigation
On-page language detectionContent language = target audienceBilingual pages, code-heavy pages, pages with minimal text content
Server location (IP geolocation)Server country = target audienceCDNs serving from edge locations worldwide; cloud hosting in US/EU regardless of audience
Google Search Console geo-targetingEntire property targets one countrySites targeting multiple countries within a single property

Hreflang eliminates the guessing. A properly implemented rel="alternate" hreflang="fr-FR" annotation tells Google exactly which URL to surface for French-speaking users in France. No inference from URL structure, no language detection, no geolocation assumptions.

The syntax follows ISO 639-1 language codes with optional ISO 3166-1 alpha-2 region codes:

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

Language-only codes (hreflang="fr") target all French speakers regardless of country. Language-plus-region codes (hreflang="fr-CA") target French speakers specifically in Canada. The distinction matters when content differs between regions — pricing, spelling conventions, legal disclaimers, or product availability.

The Bidirectional Rule That Breaks Most Implementations

A 2023 Ahrefs study of 374,756 domains using hreflang found that 67% had at least one implementation error severe enough to reduce or eliminate the tags' effectiveness. The single most common failure: missing return links.

The rule is absolute. If page A declares page B as its French alternate, page B must declare page A as its English alternate. When the confirmation is missing, Google discards the entire annotation — not just the broken pair, but potentially the full cluster of language alternatives for that page.

This breaks at scale for predictable reasons:

  • CMS migrations — a new market launches with fresh templates that include outbound hreflang references, but the existing-market templates were never updated to point back
  • Partial translations — a 10,000-page site translates 3,000 pages into Spanish. The English versions of those 3,000 pages get hreflang annotations. The 7,000 untranslated pages are excluded. But the Spanish pages point back to all 10,000 English pages — creating 7,000 broken references
  • URL changes without redirect updates — page B moves from /fr/produit to /fr/products/produit. Page A still points to the old URL. The redirect resolves for users but Google evaluates hreflang annotations against the declared URL, not the redirect destination

Every page in a hreflang cluster must also include a self-referencing annotation — a link pointing to itself with its own language-region code. This is not optional. Google uses the self-reference to confirm that the page acknowledges its own role in the cluster.

<!-- On the English page (https://example.com/page) -->
<link rel="alternate" hreflang="en-US" href="https://example.com/page" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="de-DE" href="https://example.com/de/page" />

<!-- On the French page (https://example.com/fr/page) -->
<link rel="alternate" hreflang="en-US" href="https://example.com/page" />
<link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="de-DE" href="https://example.com/de/page" />

Every page in the cluster carries the identical set of annotations. If your site has 5 language versions, each page carries 5 hreflang link elements — including the self-reference. At 10,000 pages across 5 languages, that is 250,000 annotation relationships that must remain bidirectionally consistent through every URL change, content migration, and market launch.

Three Methods — Choosing the Wrong One Creates Compounding Debt

Google supports three ways to declare hreflang annotations. Each has specific scalability limits. Mixing methods for the same page set creates conflicts that Google resolves unpredictably.

MethodWhere it livesBest forScalability ceiling
HTML <link> elementsPage <head>Sites with < 20 language-region variants per pageAdds markup weight per page; at 50+ variants, head bloat slows rendering
HTTP headersResponse headersNon-HTML files (PDFs, images) that cannot carry <head> elementsSame annotation-count limits as HTML; requires server/CDN configuration access
XML sitemapSitemap fileLarge sites (1,000+ pages), sites with 20+ language variants, CMS platforms that restrict head modificationsUp to 50,000 URLs per sitemap file; no page-weight impact

The XML sitemap method separates hreflang declarations from the page itself. This has two advantages at scale: it eliminates head bloat, and it centralizes annotation management in a single file that can be regenerated programmatically without touching page templates.

Sitemap hreflang syntax differs from the HTML version:

<url>
  <loc>https://example.com/page</loc>
  <xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/page" />
  <xhtml:link rel="alternate" hreflang="fr-FR" href="https://example.com/fr/page" />
  <xhtml:link rel="alternate" hreflang="de-DE" href="https://example.com/de/page" />
</url>

The critical mistake: switching methods mid-implementation without removing the old one. A page with HTML link hreflang tags AND a sitemap declaring different hreflang relationships for the same URL creates conflicting signals. Google's behavior when methods conflict is undocumented — in practice, it often falls back to ignoring both.

Choose one method per URL set and commit. For most multilingual sites under 20 languages, HTML link elements work. For sites above 10,000 pages or with frequent URL changes, the XML sitemap method scales better because updates happen in one file rather than across thousands of templates.

MendMySEO flags bidirectional mismatches, missing self-references, and method conflicts as part of its technical audit — each finding includes the exact code fix for your implementation method. Join the waitlist.

Frequently Asked Questions

Do I need hreflang if my site only targets one language but multiple countries?

Yes, if the content differs between country versions — different pricing, product availability, legal text, or spelling (US English vs. UK English). Use language-plus-region codes like hreflang="en-US" and hreflang="en-GB". If the content is identical across countries, hreflang adds no value and may create maintenance overhead without ranking benefit.

Does hreflang affect rankings directly?

Hreflang does not boost rankings. It controls which version appears for which audience. A correctly implemented hreflang setup prevents your French page from ranking in US results (losing relevance signals) and your English page from ranking in France (poor user engagement). The indirect ranking effect comes from serving the right content to the right audience — improving click-through rate, reducing bounce rate, and building market-specific engagement signals.

Can I use hreflang with a single-domain subdirectory structure?

Yes — subdirectories (example.com/fr/, example.com/de/) are the most common URL structure paired with hreflang. Google treats subdirectories as a single domain with consolidated authority, making them easier to manage than separate ccTLDs or subdomains that each need independent authority building. Hreflang tells Google which subdirectory serves which audience.

What happens if I set hreflang to a language code that does not match the page content?

Google uses on-page language detection as a secondary signal. If your hreflang declares a page as French but the content is English, Google receives conflicting signals and may ignore the hreflang annotation entirely. Always ensure the declared language matches the actual page content — including metadata, navigation, and UI elements, not just the body text.

How long does it take for hreflang changes to take effect?

Google must recrawl every page in the hreflang cluster before the annotations take effect. For HTML link elements, this means all pages in the cluster must be recrawled. For the sitemap method, Google must reprocess the sitemap. Typical timeframes range from a few days for small sites to several weeks for sites with thousands of pages. You can monitor progress in Google Search Console under the International Targeting report.