
Published:
Last modified:
So, you want to conquer the world?
One important aspect of international Search Engine Optimisation (SEO), that is often overlooked, is the use of hreflang tags. These tags help search engines determine the language and region of the target audience for a given webpage.
Effective usage of hreflang tags by website owners can guarantee that the correct audiences see the correct information relative to their location, enhancing user experience and search engine rankings.

What exactly are hreflang tags?
Hreflang tags are a HTML attribute that is used for language recognition and the geographic target of webpages. With the hreflang attribute, you tell a search engines which language and for which geographic region certain page content is intended.
Correct hreflang implementation helps search engines to discover and deliver the most relevant content to users based on their language and location preferences. By using hreflang, websites can ensure search engines understand the language and regional targeting of their content, and therefore, improve the accuracy of search engine results for users in different regions and language preferences.
By specifically addressing different language and country versions of a website, you can ensure that search engines present the correct page content to the appropriate user groups. This leads to an improved user experience, which in turn increases the conversion rate. Giving a better user interactions signals to search engines like this, can lead to improved keyword rankings.
Basic structure of a Hreflang tag
Here is what a hreflang tag might look like in your website’s HTML:
<link rel= “alternate” href= “URL” hreflang= “language-region” />
rel=”alternate”:
- This attribute specifies that the link is an alternative version of the content for different languages or regions.
href=”URL”:
- This attribute points to the URL of the alternate version of the page. This should be the full, absolute URL, including the protocol (e.g., https://).
hreflang=”language-region”:
- Language Code: The first part of this attribute is the language code, following the ISO 639-1 standard (e.g., en for English, es for Spanish, fr for French, it for Italian).
Region Code (optional)
- The second part, separated by a hyphen, is the region code, following the ISO 3166-1 alpha-2 standard (e.g., US for the United States, GB for the United Kingdom). If you don’t need to target a specific region, you can use just the language code.
Here is an example of what it would look like on a website:
<head>
<!– English for the United States –>
<link rel=”alternate” href=”https://example.com/en-us/” hreflang=”en-us” />
<!– English for the United Kingdom –>
<link rel=”alternate” href=”https://example.com/en-gb/” hreflang=”en-gb” />
<!– Spanish for Spain –>
<link rel=”alternate” href=”https://example.com/es-es/” hreflang=”es-es” />
<!– Default version (fallback) –>
<link rel=”alternate” href=”https://example.com/” hreflang=”x-default” />
</head>
Important considerations
- Self-Referencing: Each page should include a hreflang tag pointing to itself.
- Language and Region Codes: Always use valid ISO 639-1 language codes and ISO 3166-1 alpha-2 country codes.
- Multiple Languages or Regions: You can specify as many hreflang attributes as needed for each language/region combination.
What issues a solid hreflang strategy can fix?
Incorrect language or region targeting
- Problem: Without hreflang tags, search engines might show the wrong language version of a website to users. For example, a Spanish speaker in Mexico might see the Spanish version meant for Spain, which may have different content, pricing, currency or other region-specific elements.
- Solution: Hreflang tags allow you to specify the correct language and regional version of a page, ensuring that users see content tailored to their language and location.
Duplicate content issues
- Problem: When the same or very similar content exists on different pages (e.g., English content for the UK, US, and Australia), search engines might consider it duplicate content, which can negatively impact rankings.
- Solution: Hreflang tags help search engines understand that these pages are intended for different audiences based on language or region, thus preventing duplicate content penalties.
Poor user experience
- Problem: Users may land on a version of your site that doesn’t match their language or regional expectations, leading to confusion, higher bounce rates, and a negative user experience.
- Solution: By implementing hreflang tags, you can direct users to the most appropriate version of your site, improving user satisfaction and engagement.
Inefficient indexing by search engines
- Problem: Search engines may struggle to understand which version of a page to index for specific regions or languages, leading to inefficient crawling and indexing.
- Solution: Hreflang tags guide search engines, helping them index the correct pages for the appropriate audience, leading to better search visibility.
How to implement hreflang tags
There are three main ways to get hreflang tags implemented onto your website:
- HTML
- HTML Headers
- XML Sitemaps
As recently as June 2024 Google’s hreflang search developer documentation slightly changed the wording with their recommendations for implementing hreflang via HTML:
Previous version:
“Put your link tags near the top of the head element. At minimum, the link tags must be inside a well-formed head section, or before any items that might cause the head to be closed prematurely, such as p or a tracking pixel. If in doubt, paste code from your rendered page into an HTML validator to ensure that the links are inside the head element.”
Updated version:
“The link tags must be inside a well-formed head section of the HTML. If in doubt, paste code from your rendered page into an HTML validator to ensure that the links are inside the head element. Additionally, don’t combine link tags for alternate representations of the document; for example, don’t combine hreflang annotations with other attributes such as media in a single link tag.”
How to validate your hreflang implementation
Validating your hreflang implementation is crucial to ensure search engines can correctly interpret and serve the appropriate language or regional version of your content. There are several tools on the market that we use at Liberty’s international SEO agency to ensure our international clients hreflang tags are implemented properly.
- Crawl Your Website: Screaming Frog SEO Spider is a great tool to audit hreflang. It can crawl your site and find issues like missing self-referencing hreflang tags, wrong language or region codes and conflicting canonical tags.
- Hreflang Report: After the crawl Screaming Frog generates a report on hreflang tags, highlighting the errors or inconsistencies to fix.
- Ahrefs’ Site Audit tool has a localization section that checks for hreflang issues. It will find missing hreflang annotations or incorrect implementation across different pages.
- SEMRush has an audit feature that will flag hreflang issues, including incorrect syntax, missing hreflang self-referencing or conflicts between hreflang and canonical tags.
There are also some free to use tools that can quickly validate hreflang tags, as well as help you generate them:
Aleyda Solis’s Hreflang Tags Testing Tool:
- This free tool allows you to input your hreflang tags and validate their correct implementation.
- This site provides a dedicated hreflang checker to test whether your tags are correctly pointing to the intended language and region versions of your website.
- You can use this online tool to check if your hreflang tags are properly implemented. It provides detailed insights into whether tags are self-referencing and if there are any other issues.
If you’re using XML sitemaps for hreflang tagging, make sure to check your sitemap for correct syntax. You can validate your sitemap using tools like Google Search Console or Sitemap Validator.
When international SEO goes wrong.
At Liberty we had one client who sells their product across the world. Without using hreflang tags they were seeing their UK website appear in the SERPs (Search Engine Results Pages) of countries across Europe and in the U.S.A. Instead of implementing a hreflang tag strategy they decided to force redirect all U.S I.P addresses to redirect to the U.S.A version of their website.
Sounds good right? Wrong. Google bot uses many I.P addresses to crawl the web, many are U.S based. So, what happened? When the Google crawler hit the U.K site or any European site with a U.S.A I.P address it was forced to redirect to the U.S.A site, causing all properties across Europe to start to drop out of the Google index.
As you can imagine, with webpages dropping out of the index their site saw a sudden drop in organic traffic.

Luckily for them Liberty was on hand to spot this and alert their teams across Europe, so disruption was minimal.
Summary
In this blog, we’ve dived into the world of hreflang tags – a powerful yet often overlooked tool in international SEO. Want to make sure your Spanish content reaches the right Spanish speakers? Or that your UK audience doesn’t end up on your US site by accident? That’s where hreflang tags come in, helping search engines serve the right content to the right users, based on language and location.
When properly implemented, they can support the user experience and boost your rankings. We covered how a solid hreflang strategy can prevent common headaches like duplicate content penalties or inefficient indexing, which can do the opposite and decrease your rank. Plus, we walked you through how to set these tags up and gave you a toolkit of resources to validate your efforts, ensuring your global SEO is spot-on. But if you need a more in-depth analysis of your SEO, drop us a message here.
Related Posts







