top of page



What is Hreflang?

Hreflang is an HTML attribute used to indicate the geographical and language targeting of web pages within a website. It plays a crucial role when a website offers multiple versions of the same page in different languages or for different regions. 

By employing Hreflang, website owners can communicate to search engines the various versions available and assist users in finding the most suitable content.

Hreflang tags enable the specification of both region and language, allowing search engines to serve the appropriate page version based on a user's location and language preferences. 

However, it's important to note that Hreflang is a hint rather than a directive, meaning search engines may not always display the preferred version in search results. Thus, it remains essential to ensure that the content is properly localised for each target audience.

Why is Hreflang Necessary?

Hreflang serves several vital purposes for websites. 

Firstly, it helps resolve duplicate content issues. When multiple versions of a page cater to different English-speaking regions, such as the United States and the United Kingdom, there is a risk of content duplication. Hreflang tags mitigate this problem by informing search engines about the relationships between these versions, preventing them from treating the content as duplicates.

Additionally, Hreflang enhances user experience by ensuring that visitors can easily access the most relevant content based on their location and language. When users land on a page that precisely matches their preferences, they are more likely to engage with the website, spend more time exploring its pages, and avoid quickly returning to search results.

How to Implement Hreflang

There are three primary methods to implement Hreflang tags, with the choice depending on factors such as the website's size and the ease of updating pages:

1. HTML Head: This is the most common method and involves placing Hreflang tags within the HTML head of each webpage. It is a straightforward approach that requires adding an extra HTML tag to the page's head section.

<link rel="alternate" hreflang="en-US" href="">
<link rel="alternate" hreflang="en-GB" href="">


2. XML Sitemaps: Another approach is to incorporate Hreflang tags within the website's XML sitemap. This method is especially useful when managing a large number of URLs. Hreflang attributes can be included using the xhtml:link attribute within the XML sitemap.

<xhtml:link rel="alternate" hreflang="en-US" href=""/>
<xhtml:link rel="alternate" hreflang="en-GB" href=""/>


3. HTTP Headers: Hreflang can also be implemented through HTTP headers. This method is versatile, as it can be applied to non-HTML elements like PDF files in addition to regular HTML pages. It involves adding rel alternate markup to document variants in the HTTP header.
Example for a PDF file:

Content-Type: application/pdf
Link: <>; rel="alternate"; hreflang="en-GB"


X-Default Tag
The "x-default" tag designates the default version of a page to be displayed when no specific language or region is targeted. It ensures a consistent user experience in such instances.

Common Hreflang Issues

Hreflang implementation can be complex, and errors can lead to search engines ignoring the tags. Some common issues to avoid include:

• Non-Reciprocal Links: Hreflang tags must be bi-directional. If the English version of a page references the Chinese version, the Chinese version should also reference the English page.

• Incorrect Language Codes: Hreflang attributes should use ISO 639-1 language codes. Common errors include using "gb" instead of "uk" for the United Kingdom.

• Conflicting Canonical Tags: Hreflang tags should be used in conjunction with self-referencing canonical tags to avoid indexing issues. If canonical tags point to the wrong URL, it can cause confusion for search engines.

Ensuring correct Hreflang implementation is essential for international SEO and providing a seamless user experience across language and regional variations of your website.

bottom of page