The hreflang Tag Is the Most Misunderstood Line of HTML Alive
Ask ten developers what hreflang does. You'll get ten different answers. Five of them are wrong. Three are half-right. Two will hedge.
This is the most consequential tag nobody agrees on. Let's settle it.
What hreflang actually does
hreflang does one thing. It tells Google: "I have this same page in other languages or regions. Here are the URLs. Send the right one to the right human."
That's it. That's the whole job.
It does not translate anything. It is not a ranking signal (Google has confirmed this on the record, repeatedly). It does not tell the browser which language to render. It's a pure discovery-and-routing hint for the search engine.
Here's what a valid set looks like on your English homepage:
And here's the part most guides bury: every one of those language versions has to return the same block. The Spanish page needs the same four tags. The French page, same four. If page A says "I have a Spanish version at URL B," page B had better confirm it back. That return-tag handshake is the entire mechanism. Break it and Google silently ignores the cluster.
The four mistakes that kill 90% of hreflang setups
1. No self-reference
Your English page must include an hreflang tag pointing at itself. Yes, really. Think of the set as a round-table introduction — everyone has to name themselves, including the host.
2. Wrong language code
Use ISO 639-1 two-letter codes. en, not eng. If you want to target a region, append an ISO 3166-1 country code: en-US, es-MX, pt-BR. The separator is a hyphen, not an underscore. Google will reject en_US. This trips up devs who are used to Java or Ruby locale strings.
3. Missing return tags
This is the single biggest killer. Site A declares three languages. Sites B and C only declare themselves. Google sees the handshake is broken and treats the set as incomplete. You get zero benefit.
Search Console actually has a dedicated error for this: "No return tags." Look for it.
4. Missing x-default
Not technically required, but skipping it is a bad idea. x-default is your fallback — it's the page Google serves when the visitor's language doesn't match any of your declared versions. Without it, Google has to guess. It usually guesses wrong.
"But I added hreflang and nothing happened"
Nothing visible, no. That's normal.
The effect of correct hreflang is that a Spanish speaker searching in Mexico sees your /es/ URL in the SERP instead of your English one. Same result for French speakers in France seeing your /fr/ page. You don't see this happening unless you're watching your Search Console "Country" + "Query" reports closely.
What you'll often notice first is a drop in international bounce rate and a lift in impressions on non-English queries. That's hreflang working quietly in the background.
Where to put the tags
Three options, pick one:
- <head> on every page — simplest, works everywhere, but doesn't scale for huge sites
- HTTP headers — useful for non-HTML resources like PDFs
- XML sitemap — best for sites with thousands of pages; declare the alternates once per URL in the sitemap itself
Don't mix strategies. Pick one and be consistent. Mixed sources is where audit tools lose the plot.
The honest part
Hand-maintaining hreflang across a growing multilingual site is miserable. Every new page needs to be added to every other page's alternate block. Every URL change breaks the handshake. Every CMS import creates orphaned return-tag errors.
This is one of the reasons we built SiteDialect to handle the plumbing for you. When a visitor requests your page, SiteDialect serves it in their language and emits the correct alternate links automatically — self-reference, return tags, x-default, all of it. You write your page once in your canonical language and stop thinking about the handshake.
If you've ever opened a CSV of hreflang errors from Screaming Frog and felt your soul leave your body, this might be the cheapest way out.
Let the hreflang plumbing handle itself
One line of code. Correct alternates, auto-generated. Stop babysitting the handshake.
Get Started Free