How the tags are written
Each version of a page lists every version in the set, and that includes itself. Most sites do this with link tags in the page's head, but the same information can go in an HTTP header or the XML sitemap instead. It's best to use one method across the whole site.
Each tag carries a code for the language, and you can add a region after it. en covers English speakers anywhere, while en-GB is English for the UK and en-AE is English for the UAE. The codes aren't case-sensitive, so en-gb and en-GB mean the same thing.
The tags have to work both ways. If your UK page points to your UAE page, the UAE page needs to point back, otherwise Google may ignore the pair. It's also worth adding an x-default line, which names the page to show anyone who doesn't match one of your regions.
| Page lists | en-GB | en-AE | en-US |
|---|---|---|---|
example.com/uk/ | Self | ||
example.com/ae/ | Self | ||
example.com/us/ | Self |
<link rel="alternate" hreflang="en-AE" href="https://example.com/ae/">Common hreflang mistakes
The most common one we see is a wrong region code. The UK's code is GB, so en-UK doesn't work. Missing return links are almost as common, usually after a new regional page is added without updating the others.
The tags should also point at the final, indexable address of each page. A tag that points to a redirect, a page with a noindex tag, or a page whose canonical tag names somewhere else sends Google mixed signals. The same goes for canonical tags that point every regional version at one page, because that tells Google the other versions are duplicates.
Remember that these tags are only a signal. They don't translate anything for you, and Google can still show a different version if it thinks that one suits the searcher better. They work best when each version is genuinely written for its market, with its own currency, contact details, and local wording where they differ.
How we handle hreflang on our own sites
We run regional sites of our own, so we've had to decide when the tags help and when they don't.
src/layouts/SiteLayout.astro {HREFLANG && regions.map((m) => (<link rel="alternate" hreflang={m.locale} href={m.url} />))}Tags only once a second region is liveOur new site is live in the UK first, and our other regional sites haven't moved onto it yet. Hreflang only works when both pages exist and point back to each other, so the tags stay switched off until another region launches, then go on for the pages both sites share.

