3 Common Hreflang Tag Errors & How To Fix Them

Hreflang tags are useful for any website that is looking to target multiple languages and/or countries with translated versions of the same page. Similarly to the canonical tag, these tags are a ‘hint’ to Google. In other words, they’re...

3 Common Hreflang Tag Errors & How To Fix Them

Hreflang tags are useful for any website that is looking to target multiple languages and/or countries with translated versions of the same page.

Similarly to the canonical tag, these tags are a ‘hint’ to Google. In other words, they’re not a ‘directive’ and they can be ignored by Google, but in most cases, they tend to be adopted as they aim to serve a better user experience for the end-user.

Three common errors with hreflang tags to be aware of

Hreflang tags are one of the most complex areas of SEO to grasp, as they’re particularly technical and are often incorrectly implemented.

The good news is, we’ve listed below the three most common errors associated with hreflang tags, with advice on how to set them up correctly.

1. They’re not bi-directional

Old Way New Way

Whenever a hreflang tag is referenced on a page in the HTML, it should provide a list of alternative versions of the same page, with the target county and the target language associated with each page listed.

So, if you’re on a page example.com/page/ and you have alternative versions of this page for English speakers in the UK, you would need to reference these URLs like so:

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

The key point here is that if you were to visit any of these alternative pages, the same hreflang tags should be present in order to reference back to the US version of the page.

This will ensure that all variations of the URL will reference each other with the same country and language references.

2. They’re not self-referencing

GIPHY

In the example above, you’ll notice that all three versions of the page are listed in the hreflang code. This means that on the US version of the page, it is also making reference to itself within the code. This is one of the most common errors we see so it’s worth checking.

This isn’t a necessary step, Google can usually do a pretty good job at working out the alternate versions of each page without the self-referencing line. However, as always with SEO you should try and ‘do all the things’ to make sure that you have the best chance at ranking internationally.

3. They don’t have a default page to fall back on

english GIF

GIPHY

Another common error is that the web page doesn’t specify a default URL to fall back on.

In other words, if you only have a Spanish, English and French version of a page, and a German speaker visited your site – which version should Google show?

In most instances, a website can default to ‘English’ as the fallback language, as it is so widely used. However, this will depend on your target market so make sure it’s the most relevant choice for the highest number of non-attributed visitors. You can always create more translated versions of a page if you feel there are more languages or countries to target – just be sure to make them bi-directional and self-referencing!

Here’s what a default URL would look like in a hreflang tag:

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

All you need to do is specify your preferred URL and include ‘x-default’ in place of the country/language section. This will capture any visitors who don’t fall into your specified languages or countries and show them this version of the page.

How your Hreflang tag should look

So with all of these common mistakes in mind, how should your full Hreflang tag look in your code?

Using our above example, this is how it should look on this URL “https://example.com/page”:

<link rel=”alternate” href=”https://example.com/page” hreflang=”en-us” /><link rel=”alternate” href=”https://example.com/page-es” hreflang=”es-es” /><link rel=”alternate” href=”https://example.com/page-uk” hreflang=”en-gb” /><link rel=”alternate” href=”https://example.com/page” hreflang=”x-default” />

Who can help with Hreflang Tags?

If you’re struggling to get hreflang tags set up for your international website, we’d love to chat! We’ve worked with multiple brands on their international SEO strategy to expand into new, untapped markets across the globe.

Get in touch today to see if we can help.

Share this post