hreflang Tags
Tells search engines which language or regional version of a page to show users, based on their location or language settings.
If you have ever set hreflang tags but still seen the wrong language page rank, you already know it is a signal, not a directive.
Key points
- Use valid language and locale codes so search engines can interpret the targeting correctly.
- Each URL in a language cluster must point to all other variants, including itself.
- Include an
x-defaultfallback for users whose language or region does not match any variant. - Do not use hreflang for pages that are not equivalent versions of the same content.
- Align hreflang with your canonical tag to avoid conflicting signals.
A French user searching in English, landing on the German page
An e-commerce site sells in France, Germany, and the UK. The French page has hreflang tags pointing to the German and UK variants, plus a self-reference. A user in France searches in English. Without hreflang, Google might serve the UK page (query is English). With correct hreflang, Google shows the French page. The x-default fallback catches others.
Three ways hreflang implementation goes wrong
- Missing reciprocal links If the French page points to the German page but not vice versa, Google may ignore the cluster. Every variant must reference every other—a common oversight in hreflang implementation.
- Invalid locale codes Using en-UK instead of en-gb breaks the signal. Search engines cannot parse incorrect codes and may fall back to the default.
- No x-default fallback Without an x-default, users whose language or region does not match any variant may see a random page. The fallback ensures a sensible default, often the homepage.
Four situations where hreflang changes your decision
- Multilingual site with duplicate content When the same product page exists in English, Spanish, and French, hreflang tells Google which version to show per user. Without it, Google may treat them as duplicates and pick one arbitrarily, a risk for any seo translation or multilingual seo project.
- Regional storefronts with different prices A UK storefront with GBP prices and a US storefront with USD prices need hreflang to serve the correct regional page. Otherwise, a US user might land on the UK page and see wrong currency. The same issue occurs with seo in spanish and other language-specific storefronts.
- Country-specific landing pages A travel site with separate pages for
example.com/fr/andexample.com/de/uses hreflang to ensure French users see the French page and German users see the German page, even if the content is similar. This is a key part of seo translation strategy. - Canonical tag conflicts If you set a canonical tag pointing to the English page but hreflang points to the French page, Google gets mixed signals. Always align hreflang with your canonical URL to avoid confusion.
Three things to check before acting on hreflang
- Verify reciprocal links Use a hreflang checker or validator to confirm every variant in the cluster points to every other variant, including itself. A single missing link can break the entire set.
- Validate locale codes Check that language and country codes follow the ISO standard (e.g.,
en-gbfor British English,fr-cafor Canadian French). Invalid codes cause search engines to ignore the annotation. - Include self-referencing hreflang Every page in the cluster must reference itself with its own hreflang tag. Without it, the cluster is incomplete and search engines may ignore the annotations.
Common questions
How do you check if your hreflang tags are correct?
Use a hreflang checker or validator tool, such as the one from Sistrix or Ahrefs. It scans your pages for reciprocal links and valid codes.
What is the difference between hreflang and canonical tags?
Hreflang tells search engines which language or region version to show; canonical tags tell them which URL is the master version. They serve different purposes but must be aligned.
Can you use hreflang in an XML sitemap?
Yes. You can implement hreflang in HTML <head>, XML sitemaps, or HTTP headers. Sitemaps are useful for large sites with many language variants.
Sources
- Google Search Central Official documentation on hreflang implementation and best practices.
- Ahrefs Practical guide with common mistakes and validation tips.
- Moz Beginner-friendly overview of hreflang and its role in international SEO.