Hreflang tells Google that a page exists in several language or country versions and which one to show to whom, so versions do not compete with each other.
What it looks like
- <link rel="alternate" hreflang="nb" href="https://www.example.no/side/" />
- <link rel="alternate" hreflang="en" href="https://www.example.no/en/page/" />
- <link rel="alternate" hreflang="x-default" href="https://www.example.no/en/page/" />
Every version must carry the same set, including a reference to itself. Without return links Google ignores the annotations.
Rules
| Rule | Explanation |
|---|---|
| Language code (ISO 639-1) | nb or no, en, sv |
| Optional region (ISO 3166-1) | en-GB, en-US. Region alone is invalid |
| Return links | All versions reference each other |
| x-default | Fallback version |
| Canonical | Each version self-canonical |
| Indexable URLs | Point to 200 pages, not redirects |
Implementation
In the HTML head, HTTP headers or XML sitemaps. In WordPress, Polylang and WPML handle it automatically.
Domain structure
ccTLDs give the strongest local signal but split authority. Subfolders pool authority and are easiest to run, and suit most businesses. Subdomains are often treated as separate sites.
Common mistakes
Missing return links, invalid codes such as en-UK, hreflang to noindexed or redirected URLs, and automatic IP-based redirects that hide versions from Googlebot.
Frequently asked questions
What is hreflang?
An attribute that tells search engines which language and regional versions of a page exist.
What is x-default?
The version shown when no language version matches the user.
Read also
Sources
- Google Search Central, Localized versions of your pages: developers.google.com/search/docs/specialty/international/localized-ve
