Hreflang Tags Explained: The SEO Secret Weapon for Multi-Region Sites
Hreflang tags tell Google which version of your page to show in each country. Most sites get them wrong. Learn how to implement them correctly — or let GeoSwap auto-generate them.

If you serve different pages for different countries or languages, hreflang tags are essential. They tell search engines which version of a page to show in each locale. Get them right, and the correct page appears in the right country's search results. Get them wrong (or skip them), and Google may ignore your localized pages entirely.
What are hreflang tags?
Hreflang tags are HTML <link> elements that declare alternate versions of a page for different languages or regions. They go in the <head> of your HTML:
<link rel="alternate" hreflang="en-us" href="https://example.com/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />The hreflang attribute uses ISO 639-1 language codes (optionally with ISO 3166-1 Alpha-2 country codes). The special value x-default designates the fallback page for visitors whose locale doesn't match any other variant.
Why they matter for SEO
The scale of the problem is staggering: according to Search Engine Land, hreflang errors are found in nearly 70% of international websites audited, and 31% of international sites contain conflicting hreflang directives. Meanwhile, SEMrush data shows that sites with correctly implemented hreflang tags see a 20% drop in bounce rates from international traffic.
Without hreflang tags, search engines face three problems:
- Duplicate content: Your US and UK pages have similar content in the same language. Google may see them as duplicates and only index one.
- Wrong page in search results: A French user searching on Google.fr might see your English page instead of your French page.
- Diluted link equity: Backlinks to your regional pages don't consolidate properly, weakening all versions.
Hreflang tags solve all three: they tell Google exactly which page serves which audience, preventing duplicate detection and ensuring the right page ranks in each locale.
Common mistakes
1. Missing x-default
Every hreflang set should include an x-default tag pointing to your primary/fallback page. Without it, Google doesn't know what to show visitors from countries you haven't explicitly targeted.
2. Non-reciprocal tags
Hreflang tags must be reciprocal. If page A declares page B as an alternate, page B must also declare page A. Non-reciprocal tags are ignored by Google.
3. Wrong language/country codes
Using hreflang="uk" instead of hreflang="en-gb" is a common error. uk is the code for Ukrainian, not the United Kingdom. Always use the correct ISO codes — our country codes reference has the complete list.
4. Self-referencing tags missing
Each page must include a hreflang tag pointing to itself. The US page should include <link rel="alternate" hreflang="en-us" href="...current page...">.
5. Using hreflang with canonical conflicts
If your regional page has a canonical tag pointing to a different URL than what the hreflang declares, Google gets confused. The canonical URL and the hreflang href for that locale must match.
“Don't overdo internationalization. If you have three markets, serve three markets well. Don't try to create 200 hreflang variants for countries you barely have content for.”
Three ways to implement hreflang
- HTML tags: Add
<link rel="alternate">tags to the<head>of each page. Best for sites with a few regional variants. - HTTP headers: Use
Linkresponse headers. Best for non-HTML resources (PDFs, etc.). - XML sitemap: Add
xhtml:linkelements inside your sitemap. Best for large sites with many regional variants.
How GeoSwap auto-generates hreflang tags
When you create geo redirects in GeoSwap, we automatically generate hreflang tags based on your rules. Here's how:
- You create a redirect: “Visitors from France go to
/fr, visitors from Germany go to/de” - GeoSwap maps each country to its primary locale (France →
fr, Germany →de) - We generate the full hreflang set including
x-defaultpointing to your original page - The generated tags are available in your dashboard to copy and paste into your HTML, or use our hreflang generator tool
This eliminates the most common source of hreflang errors: manually constructing tags and getting the codes wrong.
Validating your hreflang tags
After implementing hreflang tags, validate them with our free hreflang checker or use these methods:
- Google Search Console: Check for hreflang errors under “International Targeting”
- Manual check: View source on each regional page and verify all alternates are listed and reciprocal
- GeoSwap's SEO Check: Our built-in tool flags redirects without corresponding hreflang tags
Hreflang tags are one of those SEO details that most sites get wrong or skip entirely. If you are deciding between hreflang and redirects, see our guide on geo redirects vs hreflang. For a broader view, check out our multi-regional SEO strategy guide. With GeoSwap, hreflang tags are generated automatically from your redirect rules — no manual coding, no ISO code lookups, no missing reciprocals.
