Over the past 20 years, I've worked on or audited hundreds of hreflang implementations. I've encountered a lot of misinformation and poor implementation practices, so I thought I'd round up the top ten mistakes and myths about hreflang, along with a simple guide to doing it right.This isn't a comprehensive guide on how to implement hreflang, but rather a guide on how to avoid common pitfalls. I'll provide links to the best guides for proper implementation at the end of this article.
1. It doesn't need to be comprehensive to start with
Often, it's impossible to create a 1:1 relationship with all products, categories, and pages on a large website. Don't worry about this. Start with the homepage, then add your popular pages such as top-level categories and similar pages.
2. It requires crawlable, indexable pages
For a page to be indexable, it needs to return a 200 response code, not be blocked in any way, and have a self-referencing canonical tag (or no canonical tag, though this is less preferable).I've audited many websites where hreflang points to non-indexable page versions due to:
- Geo-targeting that only allows Google to see the US version
- International variants using parameters and canonical tags pointing to the primary version
- International variants (language/currency) set by cookies rather than separate URLs
- Copying over parameters such as session / tracking parameters
To ensure hreflang has a chance of working, make sure each page version is indexable with a unique URL, correct canonical tags, and is visible to Google. Also, ensure slashes and protocols match (https, not http).
3. It's a signal, not a directive
This should have been point one. Google treats hreflang as a strong signal, not a directive. This can be confusing for businesses who believe that how they document a website for Google is how it should be interpreted. However, we often see Google ignore this due to external backlinks, internal backlinks, and other conflicting signals – or simply because Google is Google. When troubleshooting, always include this explanation.
4. Google needs to index the variants for it to work
Crawling e-commerce websites can be challenging. Adding three languages triples the URL count, and adding one product adds three more URLs. Product listing pages (PLPs) with crawlable facets can increase the URL count exponentially. Hreflang XML sitemaps can help, but it can still take time.Google's crawl rate depends on many factors. For a relatively new e-commerce website without significant authority, crawling can be quite slow. Ensure that the website has the core basics in place for effective crawling without issues that plague e-commerce websites.
5. The hierarchy of language & region
Hreflang was originally designed for languages rather than geography. I usually advise starting with language targeting before getting more specific with regions. For example:
- Spanish: /es/
- Spanish - Mexico: /mx/
- Spanish - Spain: /es/
While it might seem redundant, being more specific won't cause harm. Google is generally good at figuring out language and market without hreflang, but it's not perfect. Many sites I've worked on have a high enough failure rate to warrant implementing hreflang.
6. Regions and languages need the correct code
Use ISO-639-1 for language and ISO-3166-1 for regions. There's flexibility within this, and some people have discovered that you can use "EU" for the European Region. However, using it as a language code declares it to be Basque! Common mistakes include using "CH" for China and "UK" for the United Kingdom (use "GB" instead).
7. Not in the head
If you're using hreflang code, it must go in the <head> section of the page. The <head> is fragile, and putting any code that should be in the <body> can break it. A good example of this is the "no-code" part for Google Tag Manager.Validate the page using an HTML validator to ensure this hasn't happened. This issue can creep in easily.
8. No return tags on the target pages
Failing to include reciprocal hreflang tags on all corresponding pages renders the tag useless. This is especially common when ownership and management of global e-commerce websites fall under separate teams or platforms. Half a job in this case is useless (and again, if the <head> is broken on any page, it has the same impact).
9. Lack of self-referencing tags
Like return tags, it's important to have self-referencing tags, similar to canonical tags.
10. Conflicting signals
Hreflang in XML sitemaps, in the code, and other signals such as the page content can conflict if not properly aligned. If the content isn't in the right language, or if geographic signals both on and off-page conflict, it will be challenging for Google to respect any hreflang it believes is incorrect.
Mistakes Spotted by the Pros
Aleyda Solis
"Believing that all geolocation issues will be all solved just thanks to hreflang implementation rather than adding it as a part of a bigger process that aligns with many other geolocation signals to consistently specify to Google where you’re targeting to. The alignment of all signals is what will facilitate Google to establish the correct target. The signals I talk about are the ones specified in this image.
The other big mistake is believing you “ought” to specify hreflang in every single indexable url version with an alternate in a different market. Unless you have a tool/plugin/system that automates this easily without mistakes, focus on those URLs (that have alternates in the relevant markets) with actual international target misalignments instead."
- Aleyda wrote more here at Search Engine Land
- And find more on International SEO at LearningSEO.io
- Aleyda Solis - hreflang Implementation Guide
"Hreflang is typically associated with global websites targeting various markets. While that’s a very correct use case, there also is a lesser known necessity to deploy hreflang for single market websites that operate in more than one language in that market.
Officially, a website would target multiple languages if multiple languages are spoken in a given country. That’s a pretty common case for many countries in Europe, Africa, and Asia. The classic European examples include Spain (on top of Spanish, some regions speak Catalan, Galician and Basque), Switzerland (famous for speaking Romansh, as well as German, French and Italian depending on the region), Belgium (with French and Dutch – which is Belgian dialect is called Flemish, and German which is recognised only in one small part of the country).
Best way to see the common hreflang mishaps in those European countries is to look at their official government websites, as they have to be translated into all the official languages, by law.
- The Spanish public administration websites can serve as bad examples of hreflang use, as none of them got it right. For instance, the Spanish Royal Family official website used the hreflang annotations within the <body> section instead of <head> - by appending them to the language selector. The URLs are relative and not absolute. This hreflang is being ignored completely. A computer screen shot of a code
- The Swiss federal Government website uses a correct hreflang logic and placement, but points to relative instead of absolute URLs. Hreflang tags, similarly to canonicals, should always point to an absolute URL.
- Belgian Royal Family does not include any hreflang annotations, neither does the federal government website. There is a nice surprise from Belgium.be domain, though, which is an official website with citizen information. They have nailed their hreflang:
"Something I've seen many times with hreflang implementation is linking every page to the root of the language/country subfolder or subdomain instead of pointing to the specific localised versions of each page. This fails to properly associate alternate versions of the same content, effectively counteracting the main purpose of using hreflang." - Studio Hawk
"The placement of the hreflang code in the <head> matters. If a browser finds an invalid HTML element in the <head>, it will stop and move to the <body> content. Now, if your hreflang code is below an invalid element, it won't get read. A common culprit is fallback tracking pixels, like Meta for example, which use a 1px image and this is not valid within the <head>. You can check if this is an issue for you by using the W3 Validator. A quick fix for this is to move the hreflang code above any other scripts or tracking pixels. You should also move any tracking pixels with an image in them into the <body> instead."
Conclusion
Hreflang is simple in principle, but there are many things that can go wrong. What are the biggest mistakes you've seen?