Hreflang pairs each page with its language-region equivalents using ISO codes such as en-us, fr-ca, and en-gb, plus an x-default fallback. Every pair must link both ways. One missing return link and search engines ignore the pair entirely.
The codes: language first, region optional
An hreflang value is a language code from ISO 639-1, optionally followed by a country code from ISO 3166-1. So en-us is English for the United States, fr-ca is French for Canada, es-mx is Spanish for Mexico. Language alone is valid; es targets Spanish speakers everywhere. Country alone is not allowed.
The classic mistake is en-uk. The ISO country code for the United Kingdom is GB, not UK, and en-uk fails without any error message. Invalid codes get skipped silently. If your UK page never seems to surface for British searchers, check the code before anything else.
Return links, where most rollouts die
Hreflang only counts when it is reciprocal. If your US page lists the Canadian page as an alternate, the Canadian page must list the US page right back. No return link, no effect — Google discards the one-way annotation without telling you. This is the most common hreflang failure I see, usually because one region's template got updated and the other didn't.
Two related traps. The URLs you declare must be final destinations, not redirects. And each declared page should carry a self-referencing canonical. An hreflang tag pointing at a page whose canonical names a different URL sends a contradiction, and the contradiction wins.
x-default, and picking one delivery method
x-default names the fallback for searchers who match none of your declared regions — a visitor from Germany hitting a US-Canada brand, say. Point it at your most general page, usually the main English version. Then pick a single delivery method: link elements in the head, entries in the XML sitemap, or HTTP headers. Sitemap entries are the easiest to maintain past a few dozen URLs. Mixing methods invites contradictions.
Worked example: one brand, three markets
A CBD brand sells in the US, Canada, and the UK, with Canada served in English and French. Every page in the set carries five annotations:
- <link rel="alternate" hreflang="en-us" href="https://brand.com/product/">
- <link rel="alternate" hreflang="en-ca" href="https://brand.com/ca/product/">
- <link rel="alternate" hreflang="fr-ca" href="https://brand.com/fr-ca/produit/">
- <link rel="alternate" hreflang="en-gb" href="https://brand.com/uk/product/">
- <link rel="alternate" hreflang="x-default" href="https://brand.com/product/">
The same five lines appear on all four pages, identically. That is the part teams underestimate: each page references itself as well as its siblings, and the block never varies within the cluster. Change one page's block and you have broken reciprocity for the whole set.
Key takeaways
- Codes are ISO language plus optional ISO country: en-gb, never en-uk.
- Every alternate must link back, or both annotations are ignored.
- Declared URLs must not redirect and must self-canonicalize.
- x-default catches every searcher your declared regions do not cover.
Frequently asked questions
Can I use hreflang for different US states?
No. Hreflang separates languages and countries, not states. Colorado and Michigan are both en-us. To target states, build separate location or state pages and let normal relevance signals do the work.
Where do the hreflang tags go?
Pick one method: link elements in the head, entries in your XML sitemap, or HTTP headers. The sitemap route is easiest to maintain at scale. Mixing methods invites contradictions, so choose one and stay with it.
What does x-default actually do?
It names the fallback page for searchers who match none of your declared regions, like a German visitor to a US and Canada CBD brand. Point it at your most general version, usually the US or global English page.
Why is Google ignoring my hreflang?
Three usual causes: missing return links, invalid codes such as en-uk instead of en-gb, or tags pointing at URLs that redirect or carry a canonical to a different page. Fix those and the annotations start being honored.
Want this done for your brand?
We build cannabis & CBD search visibility with full transparency, for dispensaries, brands, and MSOs.
Get a free cannabis SEO audit ›