Hreflang: how to do international and multilingual SEO right
Hreflang tells search engines which page to show by language and region. Here is how to implement it correctly and avoid the mistakes that waste it.
If you run a site with more than one language or region, you have probably seen the wrong version show up in search results. A French speaker lands on your English page. A visitor in Canada gets served pricing meant for the UK. Hreflang is the tag that fixes this. It is old, it is unglamorous, and most sites still get it wrong.
What hreflang actually does
Hreflang is an annotation that tells search engines which URL to show a user based on their language and, optionally, their region. It does not translate content, and it does not merge duplicate pages the way a canonical tag does. It is a routing signal: given several versions of the same page, hreflang says which one fits which visitor.
Each tag pairs a language code (and optional region code) with a URL, for example en-US, en-GB, or fr-CA. A page should also list itself as one of its own alternates. Most implementations also include an x-default value, which is the fallback shown to visitors who do not match any listed language or region.
Common hreflang mistakes
Hreflang fails quietly. There is no error page when it breaks, just wasted signal and the wrong page showing up in the wrong market. The mistakes are almost always one of these:
- Missing return tags: page A links to page B, but page B does not link back to page A. Hreflang only works when the relationship is confirmed on both sides.
- Using a country code where a language code belongs, or the reverse. "fr-FR" means French as used in France, not just "France." A generic French page should use "fr," not a country code.
- Hreflang tags that point to a URL blocked by robots.txt or marked noindex. Search engines cannot confirm a relationship with a page they are not allowed to read.
- Hreflang added only to an XML sitemap or only in the page head, with the two out of sync after a URL change.
- No x-default, leaving search engines to guess which version to show visitors outside the listed languages and regions.
Implementing hreflang without breaking it
- Decide your URL structure first: subdirectories (example.com/fr/), subdomains (fr.example.com), or country-code domains (example.fr). Subdirectories are the easiest to maintain and the most common choice for sites without a dedicated team per market.
- Map every URL to its full set of alternates before writing a single tag. A spreadsheet with one row per page and one column per locale catches missing versions early.
- Add hreflang either in the page head or in the sitemap, not split across both inconsistently. Sitemaps are easier to keep accurate at scale because they live in one file instead of thousands of templates.
- Make sure every page in a set links to every other page in the set, including itself. A three-language page needs three hreflang entries on each version.
- Validate with a crawler or a dedicated hreflang checker after every deploy that touches URLs. Hreflang breaks silently when a page is renamed, redirected, or removed, and nothing else will tell you.
Hreflang and AI answer engines
There is no public documentation from OpenAI, Anthropic, Perplexity, or Google confirming that hreflang directly shapes what an AI answer engine cites for a given locale. Treat this as an open question, not a solved one. What is more certain is that clean locale separation, distinct URLs, correct language markup, and no mixed-language content on a single page, gives any crawler a clearer signal about what a page is and who it is for. That clarity likely helps AI systems the same way it helps a search index: less ambiguity to resolve before a page can be matched to a query.
If you are optimizing for AI visibility across markets, do not assume hreflang alone solves it. Pair it with locale-appropriate content, not machine-translated copy, since answer engines still favor pages that read naturally in the target language.
When hreflang is not worth the effort
If your site has one English page and a handful of visitors from other countries who are served fine by the same content, hreflang is overhead you do not need. It earns its cost once you maintain genuinely separate versions of a page for different languages or regions, and you need search engines to route visitors to the right one instead of guessing.
Hreflang does not create relevance. It routes visitors to the relevant page you already built.
Start small: audit whether your existing locale pages have any hreflang at all, fix the missing return tags first since they cause the most damage, and add an x-default. That alone fixes the majority of routing errors most multilingual sites carry today.