Glossary · SEO

Hreflang

pronounced as a word: HREF-langnoun

Hreflang is an HTML attribute that tells search engines which language and region a page is intended for.

Part of speech
noun
Pronunciation
pronounced as a word: HREF-lang
Origin
From the HTML 'href' attribute plus 'lang' for language. Google introduced the hreflang attribute in 2011 for multilingual sites.

What is Hreflang?

Hreflang is an HTML attribute that tells search engines which language and, optionally, which regional audience a particular page is intended for. On websites that publish the same or similar content in multiple languages or for multiple countries, hreflang lets search engines match each searcher with the most appropriate version. A visitor searching in French from France can be shown the French page, while a searcher in Mexico is served the Spanish version aimed at Latin America, all from the same underlying content set.

The mechanics work through reciprocal annotations. Each page in a group declares, for every alternate version, a URL and a language-region code, for example en for English, en-gb for English targeted at the United Kingdom, or es-mx for Spanish targeted at Mexico. These annotations can be placed in the head of the HTML as link elements, delivered in HTTP headers, or listed in an XML sitemap. A crucial requirement is reciprocity: if page A points to page B as its alternate, page B must point back to page A. When the return links are missing or inconsistent, search engines may ignore the annotations entirely. A group should also typically include a self-referencing tag and often an x-default value that specifies a fallback version for users whose language or region is not otherwise covered.

The name is a compact fusion of two existing HTML ideas. Href is the attribute that specifies a link's destination, and lang denotes language. Combined into hreflang, the attribute names a link to an alternate version defined by its language. Google introduced support for hreflang in 2011 to help multilingual and multiregional sites signal their intended audiences, addressing a growing need as more businesses served global markets from a single web presence.

For a business operating across languages or countries, hreflang matters because it directly affects whether the right people see the right pages. Without it, search engines might surface an English page to a Spanish-speaking audience, or a United States storefront to shoppers in Australia who cannot buy from it, leading to poor experiences and lost conversions. Correct hreflang implementation improves relevance, reduces the chance that near-duplicate localized pages compete against or cannibalize one another, and helps ensure that ranking strength is directed to the appropriate regional version.

The nuances and mistakes are notable because hreflang is famously easy to get wrong. Broken reciprocity, incorrect or invented language and region codes, pointing to redirected or non-canonical URLs, and mismatches between hreflang and canonical tags are all frequent errors that cause search engines to disregard the annotations. A common misunderstanding is treating hreflang as a way to boost rankings; it is a targeting and relevance signal, not a lever that raises position. It also does not replace the need for genuinely localized content, since serving identical text under different regional codes offers little value. Because the annotations must stay consistent across a whole cluster of pages, they are best generated and validated programmatically. Implemented carefully, hreflang is an essential tool for any business that speaks to more than one language or market from the same site.

Why it matters

Hreflang serves the right language version to each user and prevents regional duplicate content. It is essential for any site targeting multiple countries.