Metadata
How to add hreflang for multiple languages
What 13x checks
This is rule metadata.hreflang in the public registry: Language versions declare hreflang. It runs on every audit, against the pages we actually fetched, and its result is derived from the response rather than estimated.
- Surface
- Metadata
- Score weight
- 6 of the readiness score
- Scope
- Runs on every audited page
- Applies
- Only where the market or the page shape makes it relevant
Registry version 2026-07-30. Every rule is published, and the audit is deterministic — the same page produces the same finding every time.
The fix
The same text the audit hands you when this check fails on your own site.
Declare the language versions of each page so search engines stop guessing which audience each one is for.
Every page in a language cluster lists the whole cluster, including itself:
<link rel="alternate" hreflang="en" href="https://example.com/en/pricing" />
<link rel="alternate" hreflang="de" href="https://example.com/de/preise" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/pricing" />The four rules that make it work — breaking any one of them makes search engines discard the whole set:
1. Self-reference. Each page includes an entry pointing at itself.
2. Return links. If the English page names the German one, the German page
must name the English one back.
3. Absolute URLs. A relative href is ignored.
4. `x-default`. Names the page to serve visitors whose language matches
none of the alternates — which is most of the world.
The value is a language code, optionally with a region: de, de-AT,
pt-BR. It is never a country on its own — hreflang="at" is invalid, and
that is the most common mistake.
Alternates can also go in the sitemap instead of the markup, which is easier to keep correct on a large site. Do one or the other, not both.
Framework-specific versions
Where the change differs enough to be worth writing out separately.
Does your site have this problem?
13x checks this and 112 others against your live URL in about 30 seconds. No account, and every finding comes with the fix for your framework.
No signup. Results in 30 seconds.
More metadata checks
- How to remove a framework default titleNo framework default titles
- Every page needs a title tagEvery page has a title
- How to fix duplicate title tagsTitles are unique per page
- How to add meta descriptionsEvery page has a meta description
- How long should a title tag beTitles are a usable length
- How to fix duplicate meta descriptionsMeta descriptions are unique per page