All IssuesResourcesGlossaryAdvertiseWork With Us
Search Performance Marketing
← Marketing Glossary
Definition

Hreflang

Also known as: hreflang tags, hreflang annotations, rel=alternate hreflang

Hreflang is an annotation that tells search engines the language and optional regional targeting of a page, so the correct version is served to the right audience. It is implemented via link tags, HTTP headers, or XML sitemap entries and requires reciprocal references.

Key Takeaways

  • Hreflang is an annotation that tells search engines the language and optional regional targeting of a page.
  • It can be implemented via HTML link tags, HTTP headers, or XML sitemap entries.
  • Annotations must be reciprocal: every referenced page must point back to the others in the set.
  • Hreflang uses valid ISO language and region codes, such as en, en-GB, or es-MX.
  • Done correctly, it serves the right-language version to each audience and reduces duplicate-content confusion.

How It Works

Hreflang works by declaring, for each page, the set of alternate versions and the language or region each one targets. You can place these declarations in the HTML head as link tags, in HTTP headers for non-HTML files, or inside an XML Sitemap for large sites. Each version lists all the others, including itself, so search engines see a complete, reciprocal cluster.

The codes follow ISO standards: a language code like en, optionally with a region like en-GB. An x-default value can specify a fallback for unmatched users.

Hreflang does not consolidate ranking signals the way a Canonical Tag does; it is about serving the correct localized version, not choosing a single preferred URL. It works alongside other Structured Data and technical signals. If pages are annotated correctly but still missing from results, checking Index Coverage in Search Console confirms whether the localized versions are actually indexed.

Why It Matters

For multilingual or multi-regional sites, hreflang prevents the wrong-language page from appearing in results and reduces duplicate-content confusion between similar localized versions. Done right, it sends users to the version that fits their language and location.

Example

An ecommerce store sells in the United States, the United Kingdom, and Mexico. It publishes en-US, en-GB, and es-MX versions of each product page. Every version includes hreflang annotations naming all three plus an x-default. A UK shopper searching in Google sees the en-GB page with pounds and local shipping, rather than the US page, because the annotations are reciprocal and use correct codes.

Common Mistake

Non-reciprocal annotations where page A points to B but B does not point back, plus wrong language or region codes. Hreflang must use valid ISO codes and every referenced URL must return the same set of annotations, or engines ignore them.

Frequently Asked Questions

How is hreflang different from a canonical tag?

Hreflang tells engines which language or regional version to show a given user. A canonical tag tells engines which of several similar URLs is the preferred one to index. They serve different purposes and are sometimes used together carefully.

What does an hreflang return tag error mean?

It means the annotations are not reciprocal: page A points to page B, but B does not point back to A. Search engines require every page in a set to reference all the others, or they may ignore the annotations entirely.

Do I need hreflang for a single-language site?

No. Hreflang only matters when you have multiple versions of content targeting different languages or regions. A single-language site serving one country gains nothing from it and should not add it.

Which hreflang implementation method is best?

HTML link tags are simplest for small sites. HTTP headers suit non-HTML files like PDFs. XML sitemap entries scale best for large sites because they avoid bloating every page's head. Pick one method and apply it consistently.