Skip to content

Metadata

How to add hreflang for multiple languages

Without it, search engines guess which version belongs to which audience, and they usually resolve it by picking one and treating the rest as duplicates. The result is your German page ranking in English results, or one language version quietly not ranking at all.

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:

html code
<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