Hreflang richtig gemacht: Technischer Leitfaden für mehrsprachige Websites
Google serves results in 40+ languages across 100+ countries. If your site targets multiple markets and you haven't implemented hreflang — or you've implemented it wrong — you're leaving traffic on the table. According to Ahrefs data, 75% of multi-language sites have at least one critical hreflang error. That's not a minor oversight. That's duplicate content signals, wrong-language pages ranking in the wrong country, and confused crawlers wasting your crawl budget.
Here's how to fix it — permanently.
What Hreflang Actually Tells Google
The hreflang attribute is a signal (not a directive) that tells Google: "This URL is the [language] or [language-region] version of this page." It doesn't force Google to do anything. It advises.
The syntax is straightforward:
<link rel="alternate" hreflang="en" href="https://example.com/page" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page" />
<link rel="alternate" hreflang="de" href="https://example.com/de/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />
Key distinctions that matter:
- Language only (
hreflang="en") — targets all English-speaking users regardless of location - Language + region (
hreflang="en-US",hreflang="en-GB") — targets English speakers in a specific country - x-default — the fallback page for users whose language/region doesn't match any annotation
Most operators only need language-level targeting. Region targeting matters when you have materially different content for the same language — pricing in different currencies, region-specific regulations, or genuinely different product catalogs. If your French page serves France, Belgium, Switzerland, and Canada equally, use hreflang="fr", not hreflang="fr-FR".
The self-referencing rule is non-negotiable: every page must include a hreflang annotation pointing to itself. Skip this, and Google may ignore your entire hreflang setup for that page cluster.
Three Implementation Methods
There are exactly three ways to implement hreflang. Each has trade-offs.
1. HTML <link> Tags in <head>
Place <link rel="alternate"> tags directly in the page's <head> section. Simple for small sites.
Pros: Easy to implement, works with any stack, visible in page source. Cons: Increases HTML size (20 languages × 2 tags = 40 link tags per page), slows parsing on large sites. Best for: Sites with fewer than 10 language versions and fewer than 1,000 pages.
2. HTTP Headers
Use Link headers in the HTTP response. Required for non-HTML documents (PDFs, images).
Link: <https://example.com/page>; rel="alternate"; hreflang="en",
<https://example.com/fr/page>; rel="alternate"; hreflang="fr"
Pros: Doesn't bloat HTML, works for all file types. Cons: Harder to debug, requires server-side configuration, limited header size. Best for: Non-HTML resources or API-driven architectures.
3. XML Sitemap Annotations
Add xhtml:link elements inside each <url> entry in your sitemap.
<url>
<loc>https://example.com/page</loc>
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/page"/>
<xhtml:link rel="alternate" hreflang="fr" href="https://example.com/fr/page"/>
</url>
Pros: Centralized, doesn't affect page load, scales to millions of URLs. Cons: Requires sitemap maintenance, Google must crawl the sitemap first. Best for: Large sites with 5+ language versions. This is the method we use at Empirium for most projects. Read our sitemap best practices guide for implementation details.
Our recommendation: Use HTML <link> tags AND sitemap annotations together. Belt and suspenders. The HTML tags catch Google on page crawl, and the sitemap catches it during sitemap processing.
The Most Common Mistakes
After auditing 200+ multi-language sites, these are the errors we see most often:
Missing Self-References
Every page in a hreflang cluster must point to itself. If your English page points to the French version but doesn't include a reference to itself, Google may disregard the entire annotation set.
Wrong:
<!-- On the English page -->
<link rel="alternate" hreflang="fr" href="/fr/page" />
Right:
<!-- On the English page -->
<link rel="alternate" hreflang="en" href="/page" />
<link rel="alternate" hreflang="fr" href="/fr/page" />
Non-Reciprocal Annotations
If page A says "my French version is page B," then page B must say "my English version is page A." One-way annotations are ignored. This is the #1 hreflang error across the web.
Conflicting Canonical and Hreflang
If your French page has <link rel="canonical" href="/en/page">, you're telling Google: "The real version of this page is English." That contradicts your hreflang saying "This is the French version." Result: Google ignores both signals. Each language version should have a self-referencing canonical.
Wrong Language Codes
Use ISO 639-1 for language (en, fr, de) and ISO 3166-1 alpha-2 for region (US, GB, FR). Common mistakes:
hreflang="uk"→ wrong (that's Ukrainian, not British English; useen-GB)hreflang="jp"→ wrong (the language isja,jpis the country code)hreflang="zh-CN"→ correct (Simplified Chinese for China)
Missing x-default
Without x-default, users whose language doesn't match any annotation get whatever Google decides. Always specify a fallback — typically your English or most comprehensive version.
Validation and Debugging
Don't guess. Validate.
Google Search Console
Navigate to Indexing → Pages → select a page → check "alternate" hreflang status. GSC reports three states:
- No issues — annotations parsed correctly
- No return tag — reciprocal annotation missing on the target page
- Unknown language code — invalid ISO code
Screaming Frog
Crawl your site with Screaming Frog's hreflang audit enabled. It surfaces:
- Missing self-references
- Non-reciprocal links
- Multiple hreflang entries for the same language
- Inconsistencies between HTML and sitemap annotations
For sites with 10,000+ pages, this is the fastest way to catch issues at scale.
Manual Spot-Check Script
For quick validation, curl a page and count the hreflang tags:
curl -s https://yoursite.com/page | grep -c 'hreflang'
Expected count: (number of languages + 1) (the +1 is x-default). If you have 20 languages, you should see 21 hreflang tags per page.
Ahrefs Site Audit
Ahrefs automatically checks hreflang implementation as part of its site audit. It flags missing return tags, conflicting canonicals, and language code errors across your entire domain.
Hreflang with Next.js and next-intl
If you're building with Next.js and next-intl — which is our standard stack at Empirium — hreflang implementation is largely automated.
In generateMetadata
export async function generateMetadata({ params }) {
const { locale } = await params;
const baseUrl = 'https://yoursite.com';
const languages: Record<string, string> = {};
for (const l of locales) {
languages[l] = l === defaultLocale
? baseUrl
: `${baseUrl}/${l}`;
}
languages['x-default'] = baseUrl;
return {
alternates: {
canonical: locale === defaultLocale
? baseUrl
: `${baseUrl}/${locale}`,
languages,
},
};
}
Next.js renders these as proper <link rel="alternate" hreflang="..."> tags in the HTML head automatically.
In the Sitemap
Use Next.js app/sitemap.ts to generate sitemap entries with hreflang annotations. Each URL includes <xhtml:link> entries for every locale.
This dual implementation — HTML head + sitemap — gives you maximum coverage. Read our full guide on international SEO in 2026 for the complete multi-region strategy.
Performance Impact
On a site with 20 language versions, each page carries 21 extra <link> tags (about 2KB of HTML). For most sites, this is negligible. But on pages where you're optimizing for sub-1-second LCP, consider:
- Using sitemap-only hreflang for secondary pages (blog posts, legal pages)
- Using HTML-only hreflang for high-traffic pages (homepage, pricing, product pages)
- Compressing responses with Brotli (reduces the 2KB to ~200 bytes)
The performance impact of hreflang is almost never the bottleneck. Don't over-optimize here at the expense of correctness.
FAQ
Does Google always respect hreflang annotations?
No. Hreflang is a signal, not a directive. Google may override your annotations if it detects that the content doesn't match the declared language, if the page quality is low, or if there are conflicting signals (e.g., a canonical pointing to a different language version). In practice, correct implementations are respected 90%+ of the time.
What happens if a page exists in some languages but not others?
Only annotate languages that exist. If your article is available in English, French, and German but not Spanish, don't include a Spanish hreflang tag. The x-default fallback handles users in unsupported languages. Avoid serving thin, auto-translated content just to have a page in every language — Google penalizes this.
How long does it take for Google to process hreflang changes?
Typically 2-4 weeks for new annotations to take full effect. Google needs to crawl all pages in the hreflang cluster, process the annotations, and rebuild its index. For large sites (100K+ pages), allow 4-8 weeks. You can accelerate this by submitting an updated sitemap via Google Search Console.
Should I use subdomains, subdirectories, or ccTLDs for multi-language sites?
Subdirectories (/fr/, /de/) are the strongest choice for most operators. They inherit domain authority, are easy to manage, and work seamlessly with hreflang. ccTLDs (.fr, .de) are powerful geo-signals but split your domain authority. Subdomains (fr.example.com) are a middle ground but add DNS complexity. Read our detailed analysis in the microsite vs subdomain SEO guide.
Can I use hreflang for regional content in the same language?
Yes. Use hreflang="en-US" and hreflang="en-GB" to differentiate American and British English content. This is appropriate when the content is materially different — different pricing, spelling conventions, or regulatory information. If the content is identical, just use hreflang="en".