
The mystery of Hreflang Tags: Telling Google about your pages in other languages

You’ve decided to take your e-commerce or services to the international market. To reach new audiences, you need to speak their language. So, you’ve invested time and money into translating your site into English, German, and Spanish. Now it’s time for Google to discover those translated pages so they can start ranking. This is where the “hreflang” language tag enters the picture. The mystery and confusion begin to build! Let’s try to demystify what this tag is and why it’s so important for international websites.
Language Tags prevent duplicate content and deliver the right version to the right visitor
One key reason to use hreflang tags is to help Google and other search engines understand that your pages aren’t duplicate content—they’re targeted at different markets. It also makes it easier for you to offer purchases in local currencies and comply with international tax and customs regulations. By translating your site into different languages, you’re creating a better user experience for your international visitors.
Think of hreflang tags as geolocation for Google—search engines will display the correct version of your site in search results based on the user’s language settings in their browser.
Why use Hreflang Tags when there are geolocation tools?
There are plugins and software that automatically redirect visitors based on their IP address. That kind of redirection sounds simple and user-friendly, right? The problem is when these tools also redirect Googlebot.
Googlebot crawls the web using its own IP addresses—and those are exclusively based in the U.S. This means that if your site uses a geolocation tool, Googlebot might get stuck seeing only the English version of your site. It may never discover the other language versions at all. If you’re using a geolocation plugin or service, we highly recommend making sure Googlebot’s IP addresses are whitelisted so it’s not restricted to just one language version.
Hreflang tags also offer the advantage of giving Googlebot clear signals about which languages and regions your content is targeting. Without them, Google has to make more assumptions and guesses about which version of your content should be shown to which users.
What does a hreflang tag look like?
In the code, the language tag looks like this:
<link rel=”alternate” href=”https://dindoman.se” hreflang=”sv-SE” />
What’s happening in this tag? Let’s break it down into understandable parts:
- rel=”alternate”: means that the following link points to an alternate page
- href=: here comes the URL of the alternate page
- hreflang=”sv-SE”: specifies which language and which country (in that order!) the URL is targeted at
The tag above tells search engines that https://dindoman.se is targeted at the Swedish language and Sweden.
You can see a full list of language codes and country codes here.
Country domain or language directory?
There is a difference between a country domain and a language directory. A country domain is a unique domain like dindoman.SE or dindoman.DE.
Language directories are part of the same domain as a subcategory, such as dindoman.DE/EN or dindoman.DE/SE.
For international efforts, using country domains instead of language directories usually increases the chances of ranking and visibility. Users tend to trust country domains more. It’s clearer that a domain is targeting, for example, Swedish buyers if it ends in .SE.
If you want to work with language directories, we recommend using a .COM domain, which is not targeted to a specific country.
Important rules – Incorrect implementation can have serious consequences
Take a close look—both twice and five times—before implementing your hreflang tags. They follow strict rules to be valid. If done incorrectly, it can have a significant impact on your international efforts.
But when implemented correctly, they have a great impact! They help your translated pages appear for the right audience, and you eliminate the risk of Google interpreting your pages as duplicate content.
What rules must language tags follow?
- Every URL with an hreflang tag must be indexable: exclude pages with “noindex” or those that return a 301 redirect.
- Every URL must have a self-referencing hreflang tag.
- Every page must have an hreflang tag that references other language versions.
- Every URL must have an hreflang tag, not just the homepage.
- Every hreflang tag must have a language code; the country code is optional and not necessary.
- The language code must match the language of the URL: even if you have an English site optimized for Spain, you must still be clear that the language of the page is English.
- Hreflang tags can be used to link multiple domains or language directories: both dindoman.se and dindoman.com are fine, as well as dindoman.se/sv and dindoman.se/en.
For more instructions, you can read Google’s official documentation and guidelines:
Example of Hreflang Tags:
In this setup, we are targeting Germany, the United Kingdom, Sweden, and Spain in their respective languages.
URL: https://dindoman.se
The hreflang tags for this URL should be as follows:
- <link rel=”alternate” href=”https://dindoman.se” hreflang=”sv-SE” />
(Swedish, Sweden) - <link rel=”alternate” href=”https://dindoman.com” hreflang=”en-GB” />
(English, Great Britain) - <link rel=”alternate” href=”https://dindoman.de” hreflang=”de-DE” />
(German, Germany) - <link rel=”alternate” href=”https://dindoman.es” hreflang=”es-ES” />
(Spanish, Spain)
Url: https://dindoman.com
The hreflang tags for this URL should be as follows:
- <link rel=”alternate” href=”https://dindoman.se” hreflang=”sv-SE” />
(Swedish, Sweden) - <link rel=”alternate” href=”https://dindoman.com” hreflang=”en-GB” />
(English, Great Britain) - <link rel=”alternate” href=”https://dindoman.de” hreflang=”de-DE” />
(German, Germany) - <link rel=”alternate” href=”https://dindoman.es” hreflang=”es-ES” />
(Spanish, Spain)
As you can see, we are using the same set of tags on both URLs. They must reference each other for the search engine to read the tags correctly.
How to implement Hreflang Tags
There are mainly 2 methods to implement hreflang tags:
HTML
This is created directly under the <head>
tag in the source code of each URL. This method works well if you have a smaller site and are okay with making manual updates as new URLs are added in the future.
In a Sitemap
Better for sites with a large number of pages (for example, if you have 1,000 products in 5 different languages). By adding all the URLs into a spreadsheet, you can quickly match the URLs to each other and generate a sitemap. There are also software tools that can assist with this, but always do thorough research to ensure the tools follow Google’s guidelines.
Implementing hreflang tags isn’t easy—it involves many new terms and rules that can easily get tangled up in your mind! But hopefully, you’ve learned something new and are curious to learn more!


Caroline is one of our senior SEO specialists at our Örnsköldsvik office, and the Head of SEO.