SEO

Hreflang

Hreflang is an HTML attribute that marks the language and regional version of a web page, so search engines show the most relevant variant to users in different countries. You use hreflang to indicate the relationships between pages in different languages or markets when you have multilingual or international websites. Search engines such as Google use hreflang as a signal when choosing which version of a page suits a user's language and geographical location.
→ All articles

What is hreflang?

Hreflang is an HTML attribute that tells search engines which language and which geographical audience a web page is intended for. The purpose is to help search engines present the correct version of a page to users searching from different countries or in different languages. In other words, hreflang brings structure to your international content, so users always encounter content that feels locally relevant.

The attribute works by indicating the relationships between pages in different language versions. It isn't a requirement, but a signal that search engines – Google in particular – use when assessing which page suits the user best. This means hreflang doesn't affect rankings directly, but indirectly strengthens your SEO work through more precise search results. When you work with international visibility, hreflang therefore becomes an important element in your overall SEO setup, alongside technical optimisation, link structure and sitemaps.

How do you use hreflang?

You implement hreflang via HTML, the HTTP header or XML sitemaps. The most common approach is to place it in the section of each page. Here, you specify the language and, optionally, the region using ISO codes: ISO 639-1 for the language and ISO 3166-1 Alpha 2 for the country. The combination gives you a syntax such as “da-DK” for Danish targeting Denmark or “en-US” for English targeting the USA.

A typical HTML setup looks like this:




Each page should refer both to itself and to its language alternatives, so search engines can understand the relationships correctly. You get the best effect when the implementation is reciprocal – that is, all versions point back to each other. If you work with larger websites, it's a good idea to consolidate the implementation in XML sitemaps for a better overview and easier maintenance.

Hreflang becomes particularly relevant when you work strategically with your international presence in Google Ads or SEO. When your campaigns and your organic content match users' language and culture, you strengthen both performance and user experience. However, it requires you to get the setup right, so search engines don't mistake your pages for duplicate content.

Why you should use hreflang

Hreflang is first and foremost about relevance. When you use it correctly, users are shown pages that match their linguistic and geographical preferences. This means fewer misdirected visits and a lower bounce rate, because users land on pages they can understand and relate to. At the same time, you signal to search engines that your language versions aren't duplicates but intended variants – and that protects your organic visibility.

In practice, hreflang improves conversion potential across markets, because the experience feels more targeted. When you combine correct implementation with, e.g., locally adapted content and targeted paid social, you often see more consistent performance across channels. That's because users get a coherent experience all the way from ad to landing page.

What types and variants are there?

There are two main types of hreflang setup: language- and region-specific, and x-default. The language- and region-specific versions follow the pattern “language-country”, e.g. en-US or da-DK, and are used when you have a page aimed at a specific market. You can also simply specify the language on its own if the content isn't limited to a region, such as en or da.

x-default is used as a kind of fallback when a user's language or region doesn't match any specific variant. It usually points to a global homepage or language selector, where users choose the version themselves. This gives a better user experience than sending everyone to one particular country page.

How do you use hreflang in practice?

In practice, you should only implement hreflang if you genuinely offer content in several languages or for different markets. Otherwise, it can create unnecessary complexity. Start by mapping your language versions and verify that the URL structure supports them. Once the structure is in place, implement hreflang for each version and test the result in Google Search Console. There, you can see whether the search engine recognises your tags correctly.

An example of the testing process could be:

  • Submit your sitemaps with hreflang tags to Google Search Console
  • Check warnings and errors under “International Targeting”
  • Update any incorrectly paired or missing references

If you work with large e-commerce platforms with many country pages, automating hreflang tags can save time and reduce the risk of errors. At the same time, you need to make sure your language versions reflect cultural differences – not just in the copy, but also in design and the use of images. Here, collaboration between content and design can be crucial to creating a consistent experience.

What should you watch out for?

Although hreflang seems simple, many errors occur because tags lack reciprocity or contain incorrect codes. Make sure you follow the official ISO standards for language and region, and check regularly that all versions point correctly to each other. If a page doesn't return a hreflang link, Google typically ignores both references.

You should also be aware that hreflang doesn't replace traditional SEO. It's a technical markup that needs to be supplemented with optimised content, internal links and correct structure. When you combine it with targeted SEM and locally angled content, you don't just get correct display – you get a stronger presence in every market you operate in.

Want help with this?

→ Book a chat