hreflang Tags Explained (With Examples)
hreflang tells search engines which language and region each version of a page is for, so the right page ranks for the right audience. It trips almost everyone up — usually on the x-default.
What they look like
<link rel="alternate" hreflang="en" href="https://example.com/"> <link rel="alternate" hreflang="de" href="https://example.com/de/"> <link rel="alternate" hreflang="es" href="https://example.com/es/"> <link rel="alternate" hreflang="x-default" href="https://example.com/">
The three most common mistakes
- No x-default. It's the fallback for users whose language you don't target. Always include it.
- Not reciprocal. If page A points to B, B must point back to A. One-way hreflang is ignored.
- Wrong codes. Use ISO language (and optional region) codes:
en,en-GB,pt-BR.
⚡ Generate correct hreflang tags (with x-default) in seconds: free hreflang generator →
Once added, confirm the rest of your technical setup with the free site audit.