Hreflang Tags - SEO Best Practices

The hreflang attribute was introduced by Google a few years ago. It has the advantage that a website that can be accessed internationally is loaded in the correct language.

For this to work, however, the attribute must be applied correctly.

In this article, we will explain what you have to pay attention to about the hreflang attribute.

When do you use hreflang?

There are mainly two areas of application in which the use of the hreflang attribute makes sense:

  1. If you want to offer the website in different languages.
  2. If you want to offer the website in the same language but in different countries.

Use the hreflang attribute on a multilingual website

In this case, there are at least two versions of a website, for example, one with German content and one with a Spanish translation of this content.

The hreflang attribute could look like this in this case:

<link rel = “alternate“ href = ““ hreflang = “de“ />
<link rel = “alternate“ href = ““ hreflang = “ TLD “/>

Use the hreflang attribute on a website with the same language in different countries

Use the hreflang attribute on a website with the same language in different countries

This is important if you want to offer your products in Hindi, for example, and in another Hindi-speaking country at the same time. If there is a different currency there, the content and the language are the same, but there is a difference in the prices given, among other things, due to the different currencies.

It is therefore necessary that you create a second page that is adapted to the needs of customers from Hindi-speaking countries. Among other things, you can use a subdomain or a top-level domain.

If you do not use the hreflang attribute in such a case, the Hindi version of your website may also rank in another country.

The hreflang attribute could look like this in this case:

<link rel = “alternate“ href = ““ hreflang = “hn-IN“ />
<link rel = “alternate“ href =“hreflang = “IN-TLD“ />

What does the hreflang attribute do?

The use of the hreflang attribute ensures that the website is displayed in the respective native language so that the user can understand it without any problems.

In addition, the hreflang attribute only shows the search results that are relevant for the respective region.

Another advantage, especially when you work with different language versions, is that duplicate content is avoided. This is why the hreflang markup is recommended by Google.

At the same time, a better Google ranking can be achieved through the hreflang attribute.

What requirements must be met for the hreflang attribute to work?

Basically, you have to create two prerequisites so that hreflang runs as desired and so that your website can be accessed in the correct language.

  1. All language versions must be linked.
  2. The website has to identify itself.

What is the benefit of using the hreflang attribute?

Using this attribute has positive effects on both the user and the search engine.

In this way, the user is only shown the websites that are available for his region and in his preferred language version.

This has the advantage that users can find their way around your website much better and faster and do not have to spend a long time looking for the content they want. Remember: the longer a user has to search, the higher the probability that they will leave your site quickly and look around at the competition that offers a solution that is suitable for them.

Set the hreflang correctly, so you contribute to the fact that users stay longer on your website. This in turn has a positive effect on the Google ranking, for the following reason: The length of time users stay on your website is one of the most important ranking factors for Google.

By providing two language versions for different regions, the search engine recognizes that the content is similar, but does not consider this to be duplicate content.

How you can add the hreflang attribute to your website

Often the tag is set as part of SEO (search engine optimization).

In order for the attribute to work, it needs to be placed in the right place on your website. You can choose between the following variants in this regard:

  1. Set the hreflang attribute as markup in the XML sitemap.
  2. Use it in the <head> section of the website. (Attention: It must be installed on each underside.)
  3. Enter the attribute in HTTP headers.

Various hreflang tools are available online with which you can check the existing country-specific pages on the one hand and generate links on the other.
Use, for example, the hreflang tool from Sistrix or use the checker from technical SEOYou can contact us as well.

What is the x-default hreflang attribute and what is it used for?

The x-default hreflang was created retrospectively by Google and can also be integrated into the website for the purpose of speech recognition.

The hreflang attribute could look like this in this case:

<link rel = “alternate“ href = hreflang = “x-default“ />

This has the advantage that users whose region does not have their own language version are automatically redirected to the main page.

Do you have any questions? Do not hesitate to contact us!

By Admin