Glossary

What Is Hreflang? A Quick Definition

Hreflang is an HTML attribute that tells search engines which language and regional version of a page to show searchers.

· Updated · By Rogier Bruggeman, Founder of KinetixSEO

RB
Rogier BruggemanFounder of KinetixSEO · 3 min read

What is hreflang?

Hreflang is an HTML attribute that tells search engines which language and, optionally, regional version of a page to show searchers. Sites use it when they publish the same content in multiple languages, or in one language for several countries. A site with English pages for both the US and the UK shows the pattern: the US page carries hreflang="en-us", the UK page carries hreflang="en-gb", and each names the other. Search engines then know which page belongs to which audience, so they don't have to guess.

Test the technical signal

Want to see this on your own site?

Use your own site as the evidence. Get a free SEO and AI-citation readiness baseline, then monitor what changes.

What is hreflang used for?

Hreflang matches a searcher's language and country to the right version of a page. You can put the annotations in three places: as link elements in the <head>, in an XML sitemap, or in an HTTP header for non-HTML files such as PDFs. Google treats all three as equivalent.

The value starts with a language code in ISO 639-1 format, optionally followed by a region code in ISO 3166-1 Alpha 2 format. Two mistakes are easy to miss. A region on its own is not valid, because Google does not derive the language from a country code. And en-uk does nothing, because Google says UK has no effect in hreflang. The code you want is en-gb.

Hreflang does not translate anything or redirect anyone. Google also does not use it to detect a page's language, it works that out on its own.

Why does hreflang break without warning?

Two rules from Google's documentation on localized versions break hreflang when you miss them, and neither shows on the page:

  • Self-reference: every version must list itself as well as every other version.
  • Return links: if page A names page B as an alternate, page B must name page A back.

Google is direct about the second one: "If two pages don't both point to each other, the tags will be ignored." The rule exists so another site can't name itself as an alternate version of your page.

Nothing on either page shows a missing return tag. The page renders fine and the source looks normal unless you compare both sides of the pair. The way to find one is to check the pairs directly, which is what the free hreflang checker does.

Are translated pages duplicate content?

No. Google says localized versions are "only considered duplicates if the main content of the page remains untranslated." A page with a translated body is a separate version for a separate audience, even when the layout is the same. A US and a UK page with the same English copy don't pass that test, so they can still count as duplicates. For what to do about those, see how to fix duplicate content.

What is x-default?

x-default is a reserved hreflang value for visitors whose language settings match none of your versions. Google recommends it for specifying that fallback page, and it was designed for language selector pages. It needs no language code and it follows the same rules as the rest of the set, so list it on every version.

Test the technical signal

See how your own site scores on SEO and AI-search visibility — free report, no signup.

Use your own site as the evidence. Get a free SEO and AI-citation readiness baseline, then monitor what changes.