Skip to content
← SEO Dictionary

hreflang

hreflang is an annotation identifying language or regional alternatives of a page. It helps Google understand the relationship between localized versions.

Example hreflang annotations

<link rel="alternate" hreflang="bg"
  href="https://example.com/bg/page" />
<link rel="alternate" hreflang="en"
  href="https://example.com/en/page" />
<link rel="alternate" hreflang="de"
  href="https://example.com/de/page" />

Illustrative set in the head of each of three genuine language versions. Each lists itself and the others.

Language versions refer to each other

BG, EN and DE page versions connected by reciprocal hreflang annotations.
Each genuine version lists itself and the others with hreflang. x-default can identify a general fallback; it does not translate content.
Text version
  • BG · /bg/page
  • EN · /en/page
  • DE · /de/page

Why it matters

A Bulgarian and English website can have two genuine versions of the same resource. hreflang connects those URLs and specifies the audience each version serves.

How it works

Annotations can be supplied in HTML, HTTP headers or a sitemap. They use full URLs, valid language codes and, when needed, a region. Each version should list itself and the others. x-default identifies a suitable general version for an unspecified audience.

Example

Example: <link rel="alternate" hreflang="bg" href="https://example.com/bg/page" /> <link rel="alternate" hreflang="en" href="https://example.com/en/page" /> Both pages need genuine content in their respective languages.

Common mistakes

hreflang does not translate content or determine its language in place of visible text. Missing return links and invalid codes cause problems. Do not list an empty or unpublished language version.

How can you check this in practice?

For each real language version, check absolute URLs, valid language codes, self-references and return annotations. bg and en identify languages; add a region when genuinely needed, such as en-GB. Do not list a translated page that does not exist.

Distinctions and limitations

hreflang connects alternatives; canonical identifies the preferred version among duplicates. Translated pages generally retain their own canonicals. x-default can identify a general selector or fallback but cannot replace a missing translation or determine text language.

Language and region

Language is the required first component; region is optional. en-GB and en-US make sense for genuine regional variants, not merely more annotations. Use documented codes; UK is not the correct regional code in place of GB.

Where can annotations live?

Google supports HTML link elements, HTTP Link headers and XML sitemaps as equivalent methods. Choose an approach you can maintain reliably. Repeating conflicting sets in several places adds risk rather than automatic benefit.

Official sources

Editorial responsibility: Martin Zhelyazkov · Founder of Z-Consult

Updated: 05/11/2026

For a correction or question: office@z-consult.bg