/

Hreflang

Hreflang

Hreflang is an HTML attribute that tells search engines which language and, optionally, which regional version of a page to serve to a user based on their language settings or location. It is used on websites that publish the same or similar content in multiple languages or for multiple countries, such as a US English version and a UK English version of the same page, or separate versions in English, Spanish, and French. Without hreflang, a search engine has to guess which version of a page is most relevant to a given searcher, which can result in the wrong language version being shown or duplicate content issues between near-identical pages.

The attribute is implemented as a tag containing two components: a language code, formatted according to ISO 639-1, and an optional region code, formatted according to ISO 3166-1 Alpha 2. A page targeting Spanish speakers generally would use "es," while a page targeting Spanish speakers specifically in Mexico would use "es-mx." Each page in a set of translated or localized pages needs to reference every other version in the set, including a reference to itself, so search engines can map the full group of alternates correctly. Hreflang does not translate content or influence ranking directly; it functions purely as a signal that maps relationships between equivalent pages so a search engine can select the correct version to show a given user.

Significance Of Hreflang

For a multilingual or multiregional website, hreflang directly affects whether the correct audience lands on the correct page. Incorrect or missing hreflang implementation can lead to the wrong language version ranking for a given market, cannibalization between near-duplicate pages targeting different regions, and a mismatch between the searcher's language or location and the content ultimately served. Correct implementation consolidates ranking signals across a set of equivalent pages rather than splitting them across duplicates, which supports a more accurate match between searcher intent and the page a search engine surfaces.

Methods Of Hreflang Implementation

Hreflang can be implemented in one of three ways, and a site should use only one method consistently rather than mixing them:

  • HTML tags - placed in the <head> section of each page, using <link rel="alternate" hreflang="x" href="url" /> for every language or regional variant

  • HTTP headers - used for non-HTML files such as PDFs, where hreflang information is included in the server response header instead of the page markup

  • XML sitemap - hreflang annotations are added directly into a site's XML sitemap, which can be more efficient for large sites with many localized pages

Common Hreflang Errors

  • Missing return tags, where Page A references Page B but Page B does not reference Page A back

  • Incorrect language or region codes that do not match the ISO standards

  • Pointing hreflang tags to a redirected or non-indexable URL instead of the live page

  • Failing to include a self-referencing tag on each page in the set

  • Conflicting signals between hreflang tags, the sitemap, and canonical tags on the same set of pages

  • Best Practices For Hreflang

  • Use hreflang together with an accurate canonical tag on each page rather than letting the two signals conflict

  • Keep the same implementation method across the entire site instead of mixing HTML tags, HTTP headers, and sitemap entries

  • Validate hreflang tags with a crawler tool after every deployment, since a single missing return tag can break the mapping for an entire set

  • Include an x-default tag to specify a fallback page for users who do not match any listed language or region

  • Audit hreflang alongside redirects and URL changes, since a page moved or removed without updating its hreflang references will break the set


Back to Glossary

Circle icon

We Transform Brands. Your Success Is Next.

Start your project now by booking a one-on-one consultation with our expert.

Meet the partners who are part of our success story

Team working in an office watching at a presentation
Circle icon

We Transform Brands. Your Success Is Next.

Start your project now by booking a one-on-one consultation with our expert.

Meet the partners who are part of our success story

Team working in an office watching at a presentation

/

Hreflang

Hreflang

Hreflang is an HTML attribute that tells search engines which language and, optionally, which regional version of a page to serve to a user based on their language settings or location. It is used on websites that publish the same or similar content in multiple languages or for multiple countries, such as a US English version and a UK English version of the same page, or separate versions in English, Spanish, and French. Without hreflang, a search engine has to guess which version of a page is most relevant to a given searcher, which can result in the wrong language version being shown or duplicate content issues between near-identical pages.

The attribute is implemented as a tag containing two components: a language code, formatted according to ISO 639-1, and an optional region code, formatted according to ISO 3166-1 Alpha 2. A page targeting Spanish speakers generally would use "es," while a page targeting Spanish speakers specifically in Mexico would use "es-mx." Each page in a set of translated or localized pages needs to reference every other version in the set, including a reference to itself, so search engines can map the full group of alternates correctly. Hreflang does not translate content or influence ranking directly; it functions purely as a signal that maps relationships between equivalent pages so a search engine can select the correct version to show a given user.

Significance Of Hreflang

For a multilingual or multiregional website, hreflang directly affects whether the correct audience lands on the correct page. Incorrect or missing hreflang implementation can lead to the wrong language version ranking for a given market, cannibalization between near-duplicate pages targeting different regions, and a mismatch between the searcher's language or location and the content ultimately served. Correct implementation consolidates ranking signals across a set of equivalent pages rather than splitting them across duplicates, which supports a more accurate match between searcher intent and the page a search engine surfaces.

Methods Of Hreflang Implementation

Hreflang can be implemented in one of three ways, and a site should use only one method consistently rather than mixing them:

  • HTML tags - placed in the <head> section of each page, using <link rel="alternate" hreflang="x" href="url" /> for every language or regional variant

  • HTTP headers - used for non-HTML files such as PDFs, where hreflang information is included in the server response header instead of the page markup

  • XML sitemap - hreflang annotations are added directly into a site's XML sitemap, which can be more efficient for large sites with many localized pages

Common Hreflang Errors

  • Missing return tags, where Page A references Page B but Page B does not reference Page A back

  • Incorrect language or region codes that do not match the ISO standards

  • Pointing hreflang tags to a redirected or non-indexable URL instead of the live page

  • Failing to include a self-referencing tag on each page in the set

  • Conflicting signals between hreflang tags, the sitemap, and canonical tags on the same set of pages

  • Best Practices For Hreflang

  • Use hreflang together with an accurate canonical tag on each page rather than letting the two signals conflict

  • Keep the same implementation method across the entire site instead of mixing HTML tags, HTTP headers, and sitemap entries

  • Validate hreflang tags with a crawler tool after every deployment, since a single missing return tag can break the mapping for an entire set

  • Include an x-default tag to specify a fallback page for users who do not match any listed language or region

  • Audit hreflang alongside redirects and URL changes, since a page moved or removed without updating its hreflang references will break the set


Back to Glossary

Circle icon

We Transform Brands. Your Success Is Next.

Start your project now by booking a one-on-one consultation with our expert.

Meet the partners who are part of our success story

Team working in an office watching at a presentation