TL;DR
Hreflang tells Google which language/region version of a page to show searchers, but implementation errors are extremely common and can cause the wrong pages to rank in wrong countries. Success requires: understanding the difference between language and country targeting, implementing bidirectional hreflang correctly (every page must reference all alternates including itself), validating implementation with tools before and after launch, handling edge cases like partial translations, and monitoring for issues that appear over time. Most hreflang problems stem from missing return tags, incorrect language codes, or inconsistent implementation across page templates.
Do This Today (3 Quick Checks)
- Validate current implementation: Use Ahrefs Site Audit or Screaming Frog to check for hreflang errors. Most sites have issues they don’t know about.
- Check bidirectional tags: Pick a page, check its hreflang tags, then visit each referenced alternate and verify it points back. Missing return tags are the #1 error.
- Verify language codes: Are you using correct ISO codes? “en-UK” is wrong (should be “en-GB”). “esp” is wrong (should be “es”).
Language vs Country Targeting
| Targeting Type | When to Use | Hreflang Format |
|---|---|---|
| <strong>Language only</strong> | Same content for all countries speaking that language | hreflang="en", hreflang="es" |
| <strong>Language + Country</strong> | Different content per country (pricing, regulations, local info) | hreflang="en-US", hreflang="en-GB" |
| <strong>Country only</strong> | Rare, usually combined with language | Not recommended alone |
Common scenarios:
| Scenario | Recommended Approach |
|---|---|
| English site for US and UK with same content | hreflang="en" (single version) or hreflang="en-US" + hreflang="en-GB" if tracking separately |
| Spanish site for Spain and Mexico with different content | hreflang="es-ES" + hreflang="es-MX" |
| Global English default + specific country versions | hreflang="en" for default + hreflang="en-AU", etc. for specific |
| Single language, single country | No hreflang needed |
Common ISO Code Mistakes
| Wrong | Correct | Why |
|---|---|---|
| en-UK | en-GB | UK is not ISO country code; Great Britain is GB |
| esp | es | Use 2-letter ISO 639-1, not 3-letter |
| zh-CN | zh-Hans-CN | For simplified Chinese, include script code |
| jp | ja | Japanese language code is "ja" not "jp" |
| iw | he | Hebrew modern code is "he" (iw is deprecated) |
CMS-Specific Implementation
WordPress (WPML/Polylang):
Both plugins handle hreflang automatically. Verify in plugin settings that hreflang output is enabled, then view source to confirm.
Shopify:
<!-- theme.liquid within <head> -->
{% for locale in shop.enabled_locales %}
<link rel="alternate" hreflang="{{ locale.iso_code }}"
href="{{ canonical_url | replace: request.locale.iso_code, locale.iso_code }}">
{% endfor %}
<link rel="alternate" hreflang="x-default" href="{{ canonical_url }}">
Next.js:
// generateMetadata in layout.js
alternates: {
languages: {
'en': 'https://example.com/en/page',
'de': 'https://example.com/de/page',
},
}
Hreflang Debugging Workflow
| Step | Action | Tool |
|---|---|---|
| 1 | Check single page | View source, find all hreflang tags |
| 2 | Verify bidirectional | Visit each alternate, confirm return tags |
| 3 | Bulk validation | Screaming Frog crawl all versions |
| 4 | Pattern check | Ahrefs/Semrush site audit |
| 5 | Monitor ongoing | Monthly spot checks |
Common errors:
| Error | Fix |
|---|---|
| Missing return tags | Add references on all versions |
| Self-reference missing | Add page's own hreflang |
| www/non-www mismatch | Standardize all URLs |
| Canonical conflicts | Align canonical with hreflang |
The Conversation
Ingrid, International SEO Manager at a SaaS company, site has 6 language versions across 12 country-specific domains, experiencing ranking issues where wrong country versions appear in local search results, implemented hreflang but not confident it’s correct, advanced SEO knowledge but international is complex: We have our site in 6 languages across 12 country domains. Our German site ranks in France, our UK site ranks in Australia, it’s chaos. We implemented hreflang two years ago but I don’t think it’s working. Where do I start?
SDC SEO Brain: Hreflang issues are almost always implementation errors, not Google ignoring your tags. Let’s systematically diagnose. First, what’s your domain structure?
Ingrid: We have:
- example.com (US English)
- example.co.uk (UK English)
- example.de (German)
- example.fr (French)
- example.es (Spanish for Spain)
- example.com.mx (Spanish for Mexico)
Plus more.
SDC SEO Brain: ccTLD structure is fine for international. The complexity is manageable. Let’s check implementation. Pick your homepage on example.com. What hreflang tags are present?
Ingrid: Let me check the source… I see:
<link rel="alternate" hreflang="en-US" href="https://example.com/" />
<link rel="alternate" hreflang="en-GB" href="https://example.co.uk/" />
<link rel="alternate" hreflang="de" href="https://example.de/" />
<link rel="alternate" hreflang="fr" href="https://example.fr/" />
SDC SEO Brain: I see potential issues already. First, is there an x-default tag?
Ingrid: No, I don’t see one.
SDC SEO Brain: That’s problem one. x-default tells Google what to show users who don’t match any of your specified language/country combinations. Without it, Google guesses. Add:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Usually x-default points to your primary/global version or a language selector page.
Ingrid: What else is wrong?
SDC SEO Brain: Second issue: you’re mixing formats. “en-US” and “en-GB” include countries, but “de” and “fr” don’t. This isn’t technically wrong, but it creates ambiguity. If you have country-specific German versions, use “de-DE”, “de-AT”, etc. If German is the same for all German speakers, just “de” is fine.
More importantly: do these pages actually reference each other bidirectionally? Go to example.co.uk and check its hreflang tags.
Ingrid: Checking… It has:
<link rel="alternate" hreflang="en-GB" href="https://example.co.uk/" />
<link rel="alternate" hreflang="en-US" href="https://example.com/" />
SDC SEO Brain: Problem two: example.co.uk only references US and UK English. It’s missing German, French, and Spanish alternates. Hreflang must be bidirectional AND complete. Every page must reference ALL language versions, including itself.
Correct implementation on example.co.uk:
<link rel="alternate" hreflang="en-US" href="https://example.com/" />
<link rel="alternate" hreflang="en-GB" href="https://example.co.uk/" />
<link rel="alternate" hreflang="de" href="https://example.de/" />
<link rel="alternate" hreflang="fr" href="https://example.fr/" />
<link rel="alternate" hreflang="es-ES" href="https://example.es/" />
<link rel="alternate" hreflang="es-MX" href="https://example.com.mx/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
Every version needs the complete set.
Ingrid: That’s probably inconsistent across our templates. Different teams manage different country sites.
SDC SEO Brain: That’s the root cause. Hreflang requires coordination across all versions. Options for consistent implementation:
Option 1: Centralized CMS control
One system generates hreflang tags for all versions, ensuring consistency.
Option 2: XML sitemap hreflang
Instead of on-page tags, use hreflang in your XML sitemaps. Centralize control in one sitemap file.
Option 3: HTTP headers
For non-HTML files (PDFs), use HTTP headers. Less common for pages.
Ingrid: How does sitemap hreflang work?
SDC SEO Brain: XML sitemap hreflang format:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.com/product</loc>
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/product"/>
<xhtml:link rel="alternate" hreflang="en-GB" href="https://example.co.uk/product"/>
<xhtml:link rel="alternate" hreflang="de" href="https://example.de/produkt"/>
<xhtml:link rel="alternate" hreflang="fr" href="https://example.fr/produit"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.com/product"/>
</url>
</urlset>
Advantages:
- Centralized control
- Easier to maintain programmatically
- Can be generated from a single database
Disadvantages:
- Google must crawl sitemap to see tags
- Larger sitemap files
- Still need consistency in URL mappings
Ingrid: What about pages that don’t have translations?
SDC SEO Brain: Partial translations are tricky. Options:
Option A: Don’t include in hreflang
If French version of a page doesn’t exist, French hreflang tag doesn’t appear on any version. Google shows nearest match.
Option B: Point to homepage or category
If specific page doesn’t exist, hreflang points to the closest equivalent (category, homepage). Not ideal but maintains some signal.
Option C: Point to same URL
Some recommend having untranslated hreflang point to the existing version. Google may ignore, but no harm.
Best practice: Only include hreflang tags for pages that actually exist in that language. Partial implementation is fine.
Ingrid: How do I validate the entire site?
SDC SEO Brain: Validation tools:
| Tool | What It Checks | Best For |
|---|---|---|
| <strong>Screaming Frog</strong> | On-page hreflang, return tag validation | Full technical audit |
| <strong>Ahrefs Site Audit</strong> | Hreflang issues across site | Quick overview |
| <strong>Semrush Site Audit</strong> | Hreflang errors and warnings | Quick overview |
| <strong>Hreflang Tags Testing Tool</strong> (technicalseo.com) | Single page deep check | Debugging specific pages |
| <strong>GSC International Targeting</strong> | Country targeting settings | Not hreflang specific but related |
Screaming Frog hreflang audit:
- Crawl all language versions
- Configuration → Spider → Crawl All Subdomains (or list domains)
- Reports → Hreflang → All → Export
- Check for: missing return tags, inconsistent tags, wrong language codes
Ingrid: Once we fix it, how long until we see results?
SDC SEO Brain: Timeline:
- Google recrawls pages: days to weeks
- Google processes hreflang changes: 2-4 weeks
- Ranking shifts: 4-8 weeks
Monitor GSC International Targeting report and search for site:yourdomain.com in different country Google versions to verify correct pages appearing.
FAQ
Q: What’s the most common hreflang mistake?
A: Missing return tags. Page A references Page B, but Page B doesn’t reference Page A. Both pages must reference each other (and all other alternates).
Q: Does hreflang affect rankings?
A: Not directly for ranking position. It affects which version ranks in which country. You could rank #1 but with the wrong country version showing.
Q: Should I use hreflang or rel=canonical for duplicates?
A: Both, but for different purposes. Hreflang specifies language/country alternates. Canonical consolidates true duplicates. A page can have both hreflang tags and a self-referencing canonical.
Q: What if I have one English version for all English speakers?
A: Use hreflang=”en” without country code, plus x-default pointing to the same page. Don’t create fake country variations.
Q: Can hreflang be in both HTML and sitemap?
A: Yes, Google will use both. Ensure they’re consistent. Conflicting signals cause confusion.
Summary
Hreflang tells Google which language/region version to show searchers. Wrong implementation causes wrong pages ranking in wrong countries.
Core requirements:
- Every page references ALL language versions
- Bidirectional (A→B and B→A)
- Self-referencing (page lists itself)
- x-default for users not matching any version
- Correct ISO language-country codes
Common mistakes:
- Missing return tags (most common)
- Inconsistent tags across templates
- Wrong language codes (en-UK instead of en-GB)
- Missing x-default
- Partial implementation without consistency
Implementation options:
- HTML link tags (most common)
- XML sitemap (easier to centralize)
- HTTP headers (for non-HTML)
Validation is essential:
- Use Screaming Frog or Ahrefs
- Check bidirectional tags
- Test specific pages with hreflang testing tools
- Monitor GSC International Targeting
Partial translations are okay. Only include hreflang for pages that exist in that language.
Sources
- Google Search Central: Hreflang – https://developers.google.com/search/docs/specialty/international/localized-versions
- Google: Managing multi-regional sites – https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
- ISO 639-1 Language Codes – https://en.wikipedia.org/wiki/ListofISO639-1codes