Hreflang tags tell search engines which language and regional version of a page to show each user, so a visitor in Mexico sees your Spanish-Mexico page, a UK visitor sees your UK English page, and a US visitor sees your US page. They're essential for international SEO because they prevent the wrong version from ranking in a market, reduce confusion between similar pages (such as US and UK English), and improve the experience and conversion rate for global audiences. To work, hreflang tags must use valid language and region codes, reference every alternate version including the page itself, be reciprocal, point to canonical indexable URLs, and include an x-default fallback where appropriate. Here's how they work and how to implement them correctly.
What Hreflang Does — and Doesn't Do
Hreflang does:
- Signal which page variation fits a user's language and region
- Connect equivalent pages across languages and countries
- Help search engines show the right URL in local search results
Hreflang doesn't:
- Act as a direct ranking boost
- Translate content
- Redirect users automatically
- Replace canonical tags (they work together)
Think of hreflang as a map that tells search engines, "These pages are the same content for different audiences."
When You Need Hreflang
- Multilingual sites (English, Spanish, French versions)
- Same-language sites targeting different countries (en-us, en-gb, en-au)
- Regional pages with different pricing, currency, or shipping
- Sites with translated templates but some content in a shared language
If your site has only one language and targets one country, you don't need hreflang. Broader international strategy is covered in how to optimize your website for global search.
Hreflang Syntax
A basic hreflang annotation looks like:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
- Language code: ISO 639-1 (e.g.,
en,es,fr,de) - Optional region code: ISO 3166-1 Alpha-2 (e.g.,
us,gb,mx,ca) - Language comes first; region alone is not valid
| Code | Meaning | Valid? |
|---|---|---|
| en | English, any region | Yes |
| en-us | English for the United States | Yes |
| en-gb | English for the United Kingdom | Yes (not "en-uk") |
| es-mx | Spanish for Mexico | Yes |
| es-419 | Spanish for Latin America (supported by Google) | Yes for Google |
| fr-ca | French for Canada | Yes |
| us | Region only | No |
| x-default | Fallback for unmatched users | Yes |
A common mistake is using "uk" instead of "gb" for the United Kingdom.
Full Example With x-default
For a site with US English, UK English, Mexican Spanish, and a global fallback, every page version includes the full set:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="es-mx" href="https://example.com/mx/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
The x-default value tells search engines which page to show users who don't match any listed language or region, often a global page or language selector.
The Rules That Make Hreflang Work
- Self-referencing: each page lists itself among the alternates
- Reciprocal (return tags): if page A points to page B, page B must point back to A
- Canonical, indexable URLs: link to final 200-status URLs, not redirects, noindexed, or blocked pages
- Consistent canonicals: each language version should have a self-referencing canonical, not point to another language version
- One method: implement in HTML, HTTP headers, or sitemaps, not inconsistently across several
- Absolute URLs including protocol
[ Insert infographic image here — generation prompt in the comment below ]
Three Ways to Implement Hreflang
| Method | How It Works | Best For |
|---|---|---|
HTML <link> tags |
Tags in each page's <head> |
Small to medium sites |
| HTTP headers | Link headers in server responses | Non-HTML files like PDFs |
| XML sitemaps | xhtml:link annotations in sitemaps |
Large sites with many language versions |
On WordPress, multilingual plugins like WPML, Polylang, and TranslatePress often generate hreflang automatically, and SEO plugins can work alongside them — see creating multilingual websites with WordPress.
Common Hreflang Errors
| Error | Problem | Fix |
|---|---|---|
| Missing return tags | Annotations may be ignored | Add reciprocal links on all versions |
| Invalid codes ("en-uk") | Tag not recognized | Use ISO codes ("en-gb") |
| Pointing to redirects or 404s | Broken signals | Link to final 200 URLs |
| Canonicalizing all versions to one language | Other versions may not be indexed | Self-referencing canonicals |
| Missing self-reference | Incomplete set | Include the page itself |
| Mixing implementation methods | Conflicting signals | Use one method consistently |
| Linking to noindex or robots-blocked pages | Search engines can't use the annotation | Ensure all versions are indexable |
Hreflang for Large and Growing Sites
As international sites grow, managing hreflang manually becomes difficult. Practical tips:
- Use XML sitemap implementation for sites with many languages and pages, since it keeps the HTML lighter and centralizes annotations
- Generate hreflang automatically from your CMS or e-commerce platform's language and region settings rather than editing pages one by one
- Keep a URL mapping spreadsheet that lists every equivalent page across versions
- Handle partially translated sections: only include hreflang for pages that actually have equivalents; don't point to a homepage when a matching page doesn't exist
- Plan for launches and deletions: when adding or removing a country version, update annotations on every related page
- Coordinate with redirects and migrations so hreflang always points to final URLs
Testing and Monitoring Hreflang
- Crawl the site with Screaming Frog, Sitebulb, or similar tools to audit hreflang, return tags, and status codes
- Use hreflang validation tools to check code and reciprocity
- Check Search Console performance by country to see whether the right pages appear in each market
- Spot-check search results using location settings or VPNs
- Re-audit after migrations, redesigns, or new language launches
Technical audit practices are covered in 10 technical SEO tips to boost your site's performance and how to conduct a comprehensive SEO audit in 2026.
Hreflang and Localization
Hreflang only works well when each version is genuinely tailored to its audience. Localize keywords, currency, examples, and legal information rather than relying solely on direct translation — see translation vs. localization: what's best for SEO.
Key Takeaways
- Hreflang tells search engines which language and regional page version to show each user.
- It's essential for multilingual sites and same-language sites targeting multiple countries.
- Use valid ISO codes, self-referencing and reciprocal tags, canonical URLs, and x-default.
- Implement consistently via HTML, HTTP headers, or XML sitemaps.
- Audit regularly with crawlers and monitor country-level performance in Search Console.
Frequently Asked Questions
What are hreflang tags?
Hreflang tags are annotations that tell search engines which language and regional versions of a page exist and which version to show users in each language or country. They connect equivalent pages so search results display the most appropriate version.
Do hreflang tags improve rankings?
Hreflang isn't a direct ranking factor, but it helps search engines show the correct version of your page in each market. This improves relevance, user experience, and conversion rates, and can prevent the wrong regional page from appearing in local results.
What is x-default in hreflang?
The x-default value specifies a fallback page for users whose language or region doesn't match any of the listed versions. It's commonly used for a global homepage, a language selector page, or a default international version.
Is it en-gb or en-uk for hreflang?
Use en-gb. Hreflang region codes follow ISO 3166-1 Alpha-2, where the United Kingdom is GB. Using en-uk is a common mistake and won't be recognized correctly as a valid region code.
How do I check if my hreflang tags are working?
Crawl your site with an SEO crawler to check codes, return tags, and status codes, use hreflang testing tools, and review Search Console performance by country to see whether the correct URLs appear in each market. Spot-check search results from different locations as well.
Expanding into new markets? AiScope Digital's search engine optimization services include international SEO strategy, hreflang implementation, and localization audits — get a free consultation today.
