Hreflang Methods of Implementation
February 23, 2023
Shopify Hreflang Challenges
March 30, 2023
Hreflang Methods of Implementation
February 23, 2023
Shopify Hreflang Challenges
March 30, 2023

Hreflang Rules & Guidelines

There are a few fundamental rules for implementing hreflang elements. When you have errors with hreflang, or it does not seem to work, ensure your hreflang is implemented correctly. In most cases, one of these rules has been violated or misunderstood, which causes the problem.

Rule #1 – Hreflang Pairs are Bidirectional

For hreflang to work, it requires at least one pair of alternate URLs where you indicate Page A has an alternate language version, and it is page B.  Then, for Page B, you must also state that Page B is an alternate to language version A.  This bidirectional rule must be maintained for every alternate page combination.  If Google cannot confirm this bidirectional statement, the hreflang will not be validated.

Rule #2 – Hreflang attributes must be self-referencing

The hreflang syntax requires you to have one link to “each page URL variant, including itself, creating a cluster.  If you do not self-reference the URL in the alternate list of URLs, your hreflang element will not be validated.

Rule #3 – Hreflang syntax must reference valid ISO Language/Country Codes

Using incorrect ISO language and country codes is one of the biggest errors teams make.  The syntax rules are clear, with no room or leniency for any attempt to adopt codes for other uses.  For example, you cannot use es-LA to designate your Latin America regional website, as LA is the country code for Laos.  Similarly, developers will try to use Montenegro’s ME country code for their Middle East regional site or incorrectly use the UK rather than GB for their UK website.  Just because you want it to work does not mean it will. We have a detailed guide on implementing hreflang for your regional sites, including several options.

Rule #4 – Hreflang Pairs Must be Valid URLs

For hreflang to be accepted, all alternate URLs must be valid.   If any alternate page(s) is not a valid page (200 Indexable), that pair in the cluster will break and not be valid.  This can happen due to redirects, products being out of stock, or broken URLs in a market.

In the screen capture below, Hreflang Builder imported an XML sitemap for a market and checked the validity of the URLs. Out of 3,509 URLs imported, 1,242 (35%), over one-third, were not 200 indexable. With the majority redirecting to another URL or having a different canonical tag, both will result in a hreflang cluster failing for all invalid URLs.

This is a common problem when websites are not consistent across markets.  There are cases where a product may be broken into multiple URLs in one market but not others.  For example, in the US, the site may be newer, and your blue widget may have multiple tabs or actual pages, whereas the same product in the UK only has a single page.  Developers will often try to match all three variations of the US product page to the single UK product page.  Or vice versa, the single UK page to all three versions of the US product page.  This will break the cluster rendering the hreflang element useless. 

Note that a single URL may be set to represent multiple markets.  This is discussed further in the Handling Regional Websites guide.

Bill Hunt
Bill Hunt
Bill Hunt is the President and primary architect of Hreflang Builder, with over 25 years of Search Marketing experience working with multinational companies.