GlossarySEO
What is hreflang?
Also called: hreflang tag, alternate language tag
Definition
hreflang is an annotation that tells search engines which language or regional versions of a page exist, so they can show each searcher the right one. Every version must link to every other version, including itself.
hreflang, explained
If you have the same page in English, German and Spanish, or in English for the US and the UK, hreflang connects them. Google uses it to show the German version to German searchers instead of the English one. It doesn't boost rankings; it helps the right version appear for each audience.
Google supports three equivalent ways to declare it: <link rel="alternate" hreflang="…" href="…"> tags in the page head, HTTP Link headers, or entries in your XML sitemap. Pick one. Google says there's no benefit to using more than one.
The codes follow standards. The language is an ISO 639-1 code like en or de, optionally followed by an ISO 3166-1 Alpha 2 region like en-GB or de-CH. You can't use a country code by itself; hreflang="uk" means Ukrainian, not the United Kingdom. There's also x-default, a fallback for users whose language doesn't match any version, often a language picker or your main version.
The rule that breaks most setups: annotations must be bidirectional. Google's documentation says that if page X links to page Y, page Y must link back to page X, or the annotations may be ignored. Each version should list all versions, including itself. Each version should also canonicalize to itself, not to the English page, or you tell Google the translations are duplicates.
Machine-translated pages need care. Translate the pages that have real demand in that language and have a fluent person review them. Auto-translating hundreds of pages without adding value can drift toward what Google's scaled content abuse policy describes.
Why it matters for founders
Going international is a common growth step. Without correct hreflang, your English page may outrank your localized one in the very country you built it for, and the translation effort goes to waste.
Example
Your pricing page exists at /pricing (English) and /de/pricing (German). Both pages include tags for en, de and x-default, each canonicalizes to itself, and German searchers now land on the German page.
Common mistakes
- Missing return links, so Google ignores the whole set.
- Using country codes alone, like
ukfor the United Kingdom. - Canonicalizing every translation to the English page.
- Pointing hreflang at redirected or noindexed URLs.
Sources
Checked
Related terms
- Canonical tagA canonical tag is a line in a page's HTML,
<link rel="canonical" href="…">, that tells search engines which URL is the main version when several URLs show the same or very similar content. - XML sitemapAn XML sitemap is a file that lists the URLs you want search engines to crawl and index, optionally with the date each one last changed. It helps discovery; it doesn't guarantee indexing.
- IndexingIndexing is when a search engine analyzes a crawled page and stores it in its index, the database it serves results from. A page that isn't indexed can't appear in search results.
- Scaled content abuseScaled content abuse is Google's spam policy against generating many pages primarily to manipulate search rankings rather than help users, whether the pages are made by AI, people, scraping or a mix.