April 21st 2021

If you have a global business, most likely you will have an international SEO strategy which relies on Hreflang to ensure you are serving the right content to the right users in the right location. However, for many webmasters, Hreflang can be tricky to implement.  

This article outlines what Hreflang is, why you need it and common errors we have encountered in when diagnosing Hreflang implementations. For more information on how to create an Hreflang sitemap read how to implement Hreflang sitemaps 

What is Hreflang? 

Hreflang is an HTML attribute used to establish a website page’s language and regional targeting. Is used to help search engines, like Google or Bing, to identify and understand multiple versions of similar content in different languages with different regional targets. 

Basically, you are telling Google which page, in which language should be shown to the user depending on their location and language settings. For example, different web pages targeting users in the United Kingdom, USA and Australia you need to specify which web pages search engines should show in which location as it difficult for them to understand the difference between these pages especially if the language and content are very similar.

Your Hreflang annotations should look like this:

<link rel=”alternate” hreflang=”en-gb” href=”https://example.com/uk/” /> 

<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/” /> 

<link rel=”alternate” hreflang=”en-au” href=”https://example.com/au/” /> 

All these tags should appear on all three pages to ensure that every audience gets the correct page shown in their local SERPs. This is the basics of how Hreflang works, but mistakes can often occur during implementation or while writing the tags.

Why Hreflang is Important?

Hreflang is used to avoid duplicate content issues and to improve user experience and expectations, which means a better conversion rate for your business. 

If pages have similar content in different languages ( or same language for different geographical locations) they might be considered as duplicates by Google and your specifically created pages for a specific group of audiences might not get shown to the desired audience. You will potentially miss sales, leads, downloads etc.

From a users perspective, it can be really frustrating when you are served a page from your favourite brand in the wrong language and you have to spend time navigating to the information you need. The user might even get discouraged and not click through from the SERPs to your site, choosing a site that is delivered in a language they understand. 

It is not just enough to implement your Hreflang sitemap once and ignore it. Regular clean up is required to ensure the right pages are continuously in the right SERPs. Here are the top errors we see.

10 Most Common Hreflang Mistakes

1. Missing Return Links

The basics of Hreflang annotations is that “when using an Hreflang tag, if page X links to page Y, then page Y must link back to X.” (Source: Google Developers). 

Within the Hreflang tags, every line of Hreflang code that references another page must have the same code designate on every page its implemented. 

For example:

For UK:

<link rel=”canonical” href=”https://example.com/uk/”>

<link rel=”alternate” href=”https://example.com” hreflang=”en” />

<link rel=”alternate” href=”https://example.com/uk/” hreflang=”en-gb” />

<link rel=”alternate” href=”https://example.com/fr/” hreflang=”fr-fr” />

For FR:

<link rel=”canonical” href=”https://example.com/fr/”>

<link rel=”alternate” href=”https://example.com” hreflang=”en” />

<link rel=”alternate” href=”https://example.com/uk/” hreflang=”en-gb” />

<link rel=”alternate” href=”https://example.com/fr/” hreflang=”fr-fr” />

Is important that the code is consistent across all the pages included in the Hreflang implementation and that all include in the map return a 200 status to indicate are live. Missing a return link to any page with an Hreflang tag can result in search engine dismissing it, ignoring it or misinterpreting the links provided.

2. Using the wrong Language & Country Codes

All Hreflang attributes must use the ISO 639-1 format for all the language codes and ISO 3166-1 Alpha 2 format for the regions – are standardized, international accepted formats and used by search engines also. So, if you are not using a language/country code within this standard, Google will ignore all your implementation and wouldn’t display your play in the right location. 

Always confirm all language and country/region codes during initial implementation to ensure the correct format is used.

In our experience, the most common error is using “uk” for United Kingdom instead of “gb”. 

Highlighting hreflang tags that are invalid

3. Missing or Incorrect Canonical Tags

A canonical tag is used to specify which page you prefer to get index by any search engine. Therefore, it is important that your canonicals are pointing to the correct pages or are not missed altogether or you can end up with indexation problems.

Also, if all your site’s canonical tags on all of it’s international domains are pointing only to one version of the site, instead of self-referenced, search engines may use that version of your site instead of your specific target in the Hreflang sitemap. Always cross-check your canonical tags to ensure there are no conflicts with the Hreflang mapping. 

4. Robots.txt Blocked or No-Index Pages

If a page is blocked from being indexed (using a “noindex” tag in the source code or using “disavow” in your robots.txt file), most likely your Hreflang tags on that page will be ignored.

5. Missing or Wrong “x-default”

The purpose of “x-default” is to help Google understand where to send traffic when none of the Hreflang tags applies. Google states: “The new x-default Hreflang attribute value signals to our algorithms that this page doesn’t target any specific language or locale and is the default page when no other page is better suited. “

Using our example, we can annotate this cluster of pages using the Hreflang sitemap or using HTML link tags:

<link rel=”alternate” href=”https://example.com/uk/” hreflang=”en-gb” />

<link rel=”alternate” href=”https://example.com/ca/” hreflang=”en-ca” />

<link rel=”alternate” href=”https://example.com/fr/” hreflang=”fr-fr” />

<link rel=”alternate” href=”https://example.com” hreflang=”x-default ” />

Normally, a browser location service will identify what language/location would inform what version of the site should be served, thus showing the “x-default” to users. However, there are cases when we need to evaluate our traffic so we can make the best use of the “x-default”. 

Whilst evaluating, we should consider how the visitor uses the site, especially if they are making purchases on the site, how we handle traffic outside the regions and if are any legalities about whether the product can be shown or sold in a specific country. 

6. Specify more than one URL for the Same Hreflang Value

Sometimes, we find more than one URL specified for the same Hreflang value. This mistake will make Googlebot ignore your Hreflang directive and decide which URL to use because it is not clear which page should be considered when there is more than one URL set for the same language and country.

Therefore, is important to make sure, no conflicting Hreflang URLs are present and your Hreflang tags are defined using only one URL for a specific language and country.

7. Different Language Encoding

Any site will have a language encoding in their header which lists the type of content and the global audience for the page. Usually, looks like this: <html lang=”en-US” xml:lang=”en” [..]>

We have seen errors occur when the language encoding listed within a site header does not match the Hreflang designation. For example, a site targeting the UK with a language encoding for “en-us” (instead of “en-gb”) caused a conflict with the US site.

If the language encoding conflicts, search engines can struggle to understand which content to show to what audience

8. Not using Absolute URLs

An important aspect, which we found to be overlooked quite often, is that Hreflang tags need to have absolute URLs throughout implementation. Using relative URLs can cause issues due to code errors or cause the tag to point to the wrong URL if something changes in the site structure. Additionally, you need to avoid using redirected pages in Hreflang tag or pointing to a URL which returns a 4xx or 5xx status. 

Absolute URL: https://erudite.agency/hreflang-tool/

Relative URL: /hreflang-tool/

9. Missing Self-Referencing Hreflang Tag

More than once, we noticed that a client had issues with their international sites because they didn’t use self-referencing Hreflang tag in their set of tags. Any search engine, will ignore the page or misinterpret it, resulting in the correct URL not being shown to your targeted audience. 

For example, on “https://example.com/blog/” the hreflang annotation should be:

<link rel=”alternate” hreflang=”x-default” href=”https://example.com/blog/ ” />

<link rel=”alternate” hreflang=”en” href=”https://example.com/blog/” />

<link rel=”alternate” hreflang=”es” href=”https://ahrefs.com/es/blog/” />

<link rel=”alternate” hreflang=”fr” href=”https://ahrefs.com/fr/blog/” />

But, in most cases, the  <link rel=”alternate” hreflang=”en” href=”https://example.com/blog/” /> is completely missed from hreflang tags because is thought that the x-default l or even the canonical is part of the hreflang implementation.

10. Hreflang and Canonical Tags are not the same

There is sometimes a misconception that Hrelflang and canonical tags serve the same function which is – to inform search engines which version of a page they are expected to index and use. Some webmasters attempt to merge canonical and self-referencing Hreflang tags into one.

Hreflang and canonical tags have two different functions. Combining these two will result in code errors.

We saw implementations like this:

<link rel=”canonical” hreflang=”en-us” href=”https://example.com/us/”/>

<link rel=”alternate” hreflang=”es-es” href=”https://example.com/es/”/>

which is incorrect. The right way is to have two different set of instructions:

<link rel=”canonical” href=”https://example.com/us/”/>

<link rel=”alternate” hreflang=”en-us” href=”https://example.com/us/”/>

<link rel=”alternate” hreflang=”es-es” href=”https://example.com/es/”/>

How we can Prevent any Hreflang Mistakes?

We would strongly recommend that a correct code is used in the first place and as best practice, regularly audit your Hreflang implementation. Content changes are an evolving part of a business which can lead to errors even on sites with a perfect first Hreflang implementation.

The biggest challenge of international SEO apart for content localisation is to maintain a clean, correct Hreflang code, having only valid URLs and correct canonicals included in your tags. 

That is why regular Hreflang audits is a must for any business or marketer working on an international site. Preventing and resolving any mistakes within your Hreflang tags would deliver a better positioning in your targeted market and most importantly, result in a better user experience.

If you’re looking to generate your own Hreflang sitemap then we have a handy tool for the job. Take a look at our Hreflang tool generator