Media Morpheus

Definitionby Media Morpheus Research

October 8, 2026 · Last fact-checked: October 8, 2026

What Is hreflang? How Google Uses It to Serve the Right Language or Regional Page

hreflang is an annotation, usually a <link rel="alternate" hreflang="…"> tag, that tells search engines which URL is the version of a page for a given language and, optionally, a given country.

Google documents it in Search Central and supports it in HTML, HTTP headers and XML sitemaps. Its purpose, in Google’s words, is to help “point users to the most appropriate version of your page by language or region”. Every version must list itself and every other version, and links that are not returned are ignored. The common misconception is that hreflang tells Google what language a page is in. Google says it “doesn’t use hreflang or the HTML lang attribute to detect the language of a page”.

hreflangInternational SEOTechnical SEOCanonicalization

At a Glance

  • Three equivalent methods: HTML <link> tags, an HTTP Link: header, or xhtml:link entries in a sitemap. Google says using all three brings “no benefit” (Google).
  • Values are an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code (for example en-GB). Region-only codes are invalid, and Google says es-419 is not supported.
  • “If two pages don’t both point to each other, the tags will be ignored.” Each version must also list itself.
  • x-default marks the fallback page for unmatched languages. Google introduced it in April 2013.
  • hreflang is not a canonical tag. Google does not use rel="canonical" annotations that carry an hreflang attribute for canonicalization, but it does prefer URLs in hreflang clusters when choosing canonicals.

What Is hreflang, in Google’s Words?

Google describes hreflang as the way to tell it about “localized variations of the same content”. Its guide, Tell Google about localized versions of your page (last updated September 21, 2026), says: “Use hreflang to tell Google about the variations of your content, so that we can understand that these pages are localized variations of the same content.” If you have versions “for different languages or regions”, Google says doing so “will help Google Search point users to the most appropriate version of your page by language or region.”

Google also says it may find alternate versions without help, “but it is usually best for you to explicitly indicate your language- or region-specific pages.” Google lists three cases where hreflang is recommended: a translated template around untranslated main content (common on forums), small regional variations in one language (Google’s example is English content targeted to the US, GB and Ireland), and fully translated sites.

hreflang at a Glance

hreflang is a Google-documented signal that maps each URL to a language and, optionally, a region. Every row below comes from a Google Search Central page read on October 8, 2026.

QuestionAnswerSource
Who documents itGoogle Search Central (international and multilingual sites section)Google
Where it goesHTML <head>, HTTP Link: header, or XML sitemapGoogle
Value formatISO 639-1 language, optional ISO 3166-1 alpha-2 region, optional ISO 15924 script, or x-defaultGoogle
Key ruleEvery version lists itself and all others; missing return links are ignoredGoogle
What it affectsWhich version Google shows a searcher; canonical selection within a clusterGoogle; Google
What it does not affectHow Google detects a page’s language (Google uses the visible content)Google
Cross-domainAllowed: “Alternate URLs do not need to be in the same domain”Google
Related termsrel="canonical", HTML lang, ccTLDs, x-default, geotargetingSee comparison table below

Where hreflang Comes From

Google introduced rel="alternate" hreflang in September 2010 for pages with translated templates. It expanded it in December 2011 to cover regional and fully translated content, and added x-default in April 2013. Each step is documented on Google’s Search Central Blog.

DateChangeSource
September 9, 2010rel="alternate" hreflang="x" introduced for sites whose template is translated but main content is notSearch Central Blog
December 5, 2011Support expanded to multiregional and fully translated content; alternate URLs “can be on the same site or on another domain”Search Central Blog
April 10, 2013x-default introduced for language-selector and auto-redirecting home pages, “supported by both Google and Yandex”Search Central Blog

The attribute name itself comes from HTML, where hreflang on a link states the language of the linked resource. The search-engine rules (return links, x-default, supported codes) are Google’s, and this article covers Google’s implementation only.

How to Write hreflang: HTML, HTTP Header and Sitemap

Google accepts hreflang in three places and treats them the same. Its guide says “The three methods are equivalent from Google’s perspective”, and that using all three at once brings no benefit and is “much harder to manage”. Choose one per site.

HTML link tags

Put one <link> per version, including the page itself, inside the <head>. Google says “The set of links is identical for every version of the page.” Adapted from Google’s example:

<link rel="alternate" hreflang="en-GB" href="https://en-gb.example.com/page.html" />
<link rel="alternate" hreflang="en-US" href="https://en-us.example.com/page.html" />
<link rel="alternate" hreflang="en" href="https://en.example.com/page.html" />
<link rel="alternate" hreflang="de" href="https://de.example.com/page.html" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/" />

HTTP Link header

Use this for non-HTML files such as PDFs, where there is no <head>:

Link: <https://example.com/file.pdf>; rel="alternate"; hreflang="en",
      <https://de-ch.example.com/file.pdf>; rel="alternate"; hreflang="de-CH",
      <https://de.example.com/file.pdf>; rel="alternate"; hreflang="de"

XML sitemap

Declare the xhtml namespace and give each <url> entry a child <xhtml:link> for every version, including itself. Google says these child entries “don’t count towards the URL limit for sitemaps.” If you already manage an XML sitemap, this is often the easiest method for large sites.

<url>
  <loc>https://www.example.com/english/page.html</loc>
  <xhtml:link rel="alternate" hreflang="de" href="https://www.example.de/deutsch/page.html"/>
  <xhtml:link rel="alternate" hreflang="de-CH" href="https://www.example.de/schweiz-deutsch/page.html"/>
  <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/page.html"/>
</url>

The Rules Google Applies to hreflang

Google ignores hreflang annotations that break its rules, so small errors switch the signal off. The most important rule is reciprocity: Google says “If two pages don’t both point to each other, the tags will be ignored”, so that a third party cannot claim to be a version of your page. The full list, from Google’s guide:

  • Self-reference: “Each language version must list itself as well as all other language versions.”
  • Return links: if page X lists page Y, page Y must list page X. If a complete set of bidirectional links becomes difficult to maintain, Google says you can omit some languages on some pages, but that it is important to link newly expanded language pages both ways to the originating or dominant language.
  • Absolute URLs: “fully-qualified, including the transport method”, so https://example.com/foo, not /foo.
  • Language first: the first code is an ISO 639-1 language. “You can’t specify the country code by itself.” Google’s example: be means Belarusian, not Belgium.
  • Supported codes only: “Only language codes listed in ISO 639-1 and region codes listed in ISO 3166-1 Alpha 2 are supported”; Google names es-419 as unsupported. If you use codes “listed as reserved for something else, Google Search ignores that part of the annotation”; Google’s examples are EU, UN and UK, which it says “doesn’t have an effect on Google Search”. Google’s own example for English in the UK is en-GB.
  • Case: values are case-insensitive; uppercase regions such as en-GB follow the ISO convention.
  • Scripts: you can state a script with ISO 15924, such as zh-Hant or zh-Hans-US.
  • Markup hygiene: tags must sit in a “well-formed <head>” and must not be combined with other attributes such as media in one tag.
  • A catch-all is wise: with several regional English pages, Google suggests also giving a generic en page for unmatched English speakers.

x-default is the reserved value “used when no other language/region matches the user’s browser setting.” Google says it “was designed for language selector pages” and works best there.

How Google reads example hreflang values

Classification from Google Search Central, Tell Google about localized versions of your page (last updated September 21, 2026), not a measurement

en-GB (language + region)
supported
de (language only)
supported
zh-Hans-US (language + script + region)
supported
x-default
supported: reserved fallback
en-UK
UK part ignored
es-419
not supported
be, meant as Belgium
read as Belarusian

Source: Google Search Central, Tell Google about localized versions of your page, read October 10, 2026.

Full bars mean Google accepts the whole value; the half bar means Google ignores the reserved region code UK, which Google says has no effect. All examples are Google's own.

How Google Uses hreflang

Google uses hreflang to choose which version of a page to show a searcher, and as a signal in canonical selection. It does not use hreflang to work out a page’s language. Google says it relies on “algorithms to determine the language”, and that it uses “the visible content of your page to determine its language” rather than “code-level language information such as lang attributes, or the URL” (Managing multi-regional and multilingual sites).

  • Serving: with a complete set of annotations, “Google Search returns the appropriate result for the user, according to their browser settings”, in Google’s worked example.
  • Duplicates: “Localized versions of a page are only considered duplicates if the main content of the page remains untranslated.”
  • Canonicals: Google’s canonicalization guide says that “for canonicalization purposes Google prefers URLs that are part of hreflang clusters”, and asks you to “specify a canonical page in the same language” when using hreflang. If you use rel="canonical" on localized pages, read what a canonical URL is first (Google).
  • Locale targeting: Google lists hreflang among the signals it uses to determine a page’s target audience, alongside ccTLDs, server location and “local addresses and phone numbers on the pages, the use of local language and currency”.

Google also notes that Googlebot usually crawls from the US and “sends HTTP requests without setting Accept-Language”. That is why it recommends separate URLs per language over cookies or browser-based switching, and warns against redirecting users automatically by guessed language. For how coverage in other languages relates to AI answers, see our explainer on non-English coverage and AI visibility.

What hreflang Is Not

hreflang is not a redirect, a canonical tag or a language detector. Google describes it as a way to tell Google which URLs are localized versions of each other, so it can point users to the right one. It does not move users, merge pages or change what language Google thinks a page is in.

  • Not a redirect. Users still land on the URL Google shows them. Google suggests adding visible links so users can switch versions.
  • Not a canonical. Google’s canonicalization guide says rel="canonical" annotations “with hreflang, lang, media, and type attributes are not used for canonicalization”.
  • Not a fix for mixed-language pages. Google advises “a single language for content and navigation on each page” and “avoiding side-by-side translations”.
  • Not needed for a single-language, single-market site. With one version of each page there is nothing to map.

hreflang vs Related Signals

SignalWhat it tells GoogleHow it relates to hreflang
rel="canonical"Which URL is the preferred one among duplicatesDifferent job; canonical a localized page to a page in the same language
HTML lang attributeThe page’s language, for browsers and assistive technologyGoogle says it does not use lang to detect language
ccTLD (e.g. .de)A strong country signal for the whole siteWorks alongside hreflang; Google treats some ccTLDs (such as .tv, .me) as generic
Language subdomain name (de., en-gb.)Nothing on its own, in Google’s exampleGoogle says the language-specific subdomains in its example “are not used by Google to determine the target audience for the page”
x-defaultThe fallback for unmatched languagesA reserved hreflang value
301 redirectA page has permanently movedRedirects send everyone to one URL; hreflang keeps all versions

How to Check Your hreflang Setup

Check hreflang by reading what the server actually sends, then confirming every pair links back. Google’s guide does not name a Google tool for this; it names two third-party tools, Aleyda Solis’s hreflang tags generator and Merkle’s hreflang tag testing tool, and says they “are not maintained or checked by Google”.

  1. View the source of each version (or run curl -I for header-based files) and list the hreflang values.
  2. Check self-reference: each page appears in its own list.
  3. Check return links: open each listed URL and confirm it lists the first page back.
  4. Check codes against ISO 639-1 and ISO 3166-1 alpha-2: no uk for the United Kingdom, no region-only values.
  5. Check each listed URL loads (HTTP 200) and is the version you want indexed, with a canonical in the same language, as Google’s canonicalization guide asks.

Domain moves are a common time for hreflang to break, because every alternate URL changes; our domain migration guide covers updating them.

Common Misconceptions About hreflang

MythWhat the source actually saysSource
hreflang tells Google the page’s languageGoogle “doesn’t use hreflang or the HTML lang attribute to detect the language of a page”Google
A one-way tag is enough“If two pages don’t both point to each other, the tags will be ignored”Google
en-UK targets BritainUsing UK in hreflang annotations “doesn’t have an effect on Google Search”; Google’s example for UK English is en-GBGoogle
es-419 targets Latin AmericaGoogle lists es-419 as not supportedGoogle
Translated pages are duplicate contentLocalized pages are duplicates “only … if the main content of the page remains untranslated”Google
A de. subdomain is enough to target GermanyThe language-specific subdomains in Google’s example “are not used by Google to determine the target audience for the page; you must explicitly map the target audience”Google

Frequently Asked Questions

Is hreflang a ranking factor?

Google’s hreflang guide does not call it a ranking factor. It says hreflang helps Google Search “point users to the most appropriate version of your page by language or region”. Google’s multi-regional guide adds that geotargeting, for which it lists hreflang as a page-level method, “can improve your page rankings in the target country, but at the expense of results in other locales or languages.”

Do I need hreflang if my site is only in English?

Not if you have one version of each page. Google recommends it when you have localized variations, including English pages that differ by region, such as US and UK pricing.

Should every page include a self-referencing hreflang?

Yes. Google says each language version must list itself as well as all other language versions, and the set of links is identical on every version.

What is hreflang x-default?

A reserved value that names the page to show when no other language or region matches the user’s browser settings. Google introduced it in April 2013 and says it works best on language selector pages.

Can hreflang point to a different domain?

Yes. Google says alternate URLs do not need to be on the same domain, so a .com and a .de site can annotate each other, as long as both link back.

Is en-UK a valid hreflang value?

Not for targeting the United Kingdom. Google says that if you use codes listed as reserved for something else, Google Search ignores that part of the annotation, and that using EU, UN or UK in hreflang annotations “doesn’t have an effect on Google Search”. Google’s example for English-language content for users in the UK is en-GB.

Should I use HTML tags or a sitemap for hreflang?

Either. Google says the HTML, HTTP header and sitemap methods are equivalent and recommends picking the one that is most convenient; sitemaps are often easier on large sites, and headers suit PDFs.

Can hreflang and canonical tags be used together?

Yes, but each localized page should be canonical to a page in the same language. Google ignores rel="canonical" annotations that carry an hreflang attribute and prefers URLs in hreflang clusters when choosing canonicals.

Does Google use the lang attribute instead of hreflang?

No. Google says it does not use code-level language information such as lang attributes or the URL to detect a page’s language; it uses the visible content.

Sources and Methodology

This explainer is built from Google Search Central documentation and Google’s Search Central Blog, read on October 8, 2026. Google’s hreflang guide was last updated September 21, 2026. Rules and quotations are Google’s; this article does not cover how other search engines handle hreflang, which they document separately. We did not test hreflang on a live site for this article, and the third-party tools Google names were not evaluated.

  1. official Google Search Central, Tell Google about localized versions of your page (last updated September 21, 2026).
  2. official Google Search Central, Managing multi-regional and multilingual sites.
  3. official Google Search Central, How to specify a canonical with rel="canonical" and other methods (last updated July 10, 2026).
  4. official Google Search Central Blog, Unifying content under multilingual templates (September 9, 2010).
  5. official Google Search Central Blog, New markup for multilingual content (December 5, 2011).
  6. official Google Search Central Blog, Introducing “x-default hreflang” for international landing pages (April 10, 2013).