How hreflang works

The hreflang tag is a signal to Google and Bing: this page exists in several language versions,
and here are their URLs. The engine uses that information to serve the right version, based on the
visitor’s browser language and location.

The basic markup in the <head> of every language version:

<!-- On the German version /de/personalisierung/ -->
<link rel="alternate" hreflang="de" href="https://example.com/de/personalisierung/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/personalization/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/personalization/" />

<!-- On the English version /en/personalization/ — the same set of tags -->
<link rel="alternate" hreflang="de" href="https://example.com/de/personalisierung/" />
<link rel="alternate" hreflang="en" href="https://example.com/en/personalization/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/personalization/" />

Important: hreflang must be reciprocal — every page references all the versions, including
itself. A one-sided declaration is ignored.

URL structure for multilingual sites

Option Example Pros Cons
Subdomain de.example.com Independent geotargeting settings in Search Console Harder to share domain authority
Subfolder example.com/de/ Shared domain authority, simple hreflang Harder to separate in Search Console
Separate domain example.de The strongest geolocation signal Link equity is fragmented

For most online stores a subfolder (/de/, /en/) is the best balance.

Common mistakes

No x-default: the hreflang="x-default" tag names the version for visitors whose language is
covered by none of the other annotations. Without it, Google chooses for you.

hreflang URLs that do not match real pages: if an annotation points at a URL that returns a 404
or a redirect, Google discards the whole hreflang cluster for that group.

Different tag sets on different versions: if the German page references the English one but the
English page does not reference it back, the hreflang is broken.

Mixing it with canonical: when a page carries a canonical pointing at another version and at the
same time an hreflang pointing at itself, the signals conflict. Canonical is the stronger of the
two, and Google may ignore the hreflang.

Checking hreflang

Audit tools: Google Search Console (International Targeting, the errors report), Screaming Frog in
hreflang mode, Ahrefs Site Audit, and hreflang.org for a quick check of a single URL.