Skip to content
SEO

What is Hreflang?

Hreflang is an HTML attribute that tells search engines which language and region a page targets. Hreflang prevents duplicate-content issues across localized versions and serves the right page to the right audience.

Why Hreflang matters

When the same page exists in several languages or for several countries, search engines need to know which version to show to whom; otherwise the English page may appear in Germany, or the versions get treated as duplicates. Hreflang annotations declare the relationship: each version lists all the others, including itself, with language and optional region codes, plus an x-default for everyone else.

The annotations must be reciprocal: if the German page lists the English one but the English page does not list the German one, both are ignored. They can live in the HTML head, in HTTP headers for non-HTML files, or in the sitemap, which is easier to maintain for large sites. Hreflang does not translate anything and does not replace a canonical; every localised version should still canonicalise to itself.

Example

In the head of the English page (the German page carries the same set):

<link rel="alternate" hreflang="en" href="https://example.com/pricing">
<link rel="alternate" hreflang="de" href="https://example.com/de/pricing">
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing">

Return links on every version, and codes in ISO 639-1 (language) plus ISO 3166-1 (region).

Common mistakes

  • •Missing return links, which invalidates the whole cluster.
  • •Invalid codes such as en-UK (it is en-GB) or a country code without a language.
  • •Pointing hreflang at redirected or non-canonical URLs.

How Webmatik checks it

The Multi-language support (hreflang) check looks for hreflang annotations on each audited page and reports what it finds; a site published in one language is not expected to carry them.

Check your own site

Free SEO Checker

Title tags, headings, structured data, crawlability — and the keywords you already rank for.

Run the free check

Related SEO terms

See how your website scores across SEO, GEO, performance, and more

Run a free audit