DRUPAL MODULE: HREFLANG

What is the Hreflang tag?

Introduced by Google in December 2011, the hreflang attribute allows you to show search engines (Google among them) what is the relationship between web pages in alternative languages.

That is, it is very useful when you create specific content for a local audience and you have a multi-language website.

The Hreflang tag sends a signal to search engines when a user queries a certain language and expects to find results in that language instead of a page with similar content in another language.

For example, if you create an English version of your home page originally made in Spanish, you should mark it as "English" using the hreflang = "en".

This way, people who have an IP address whose search engine has reason to believe they are in an English-speaking country will discover your page in English instead of Spanish.

This can decrease your bounce rate and increase your conversions, ensuring that your target audience reaches the most appropriate version of your page.

Hreflang can also be used to show that you have targeted content for single language variants.

If that is your case, you can segment your pages even further, specifically by extending the hreflang attribute with annotations that indicate which region the localized content is for.

For example, for Spain, the hreflang is "es-es", while for Mexico it is "es-mx". This is particularly useful for segmenting users geographically and for controlling for variations in currency, freight, zones and culture.

Hreflang is very important for international SEO

In short, the hreflang tag is a programming language element used to indicate that a page should be displayed to users from a specific country or language.

And it should be mandatory to have it correctly configured on all your pages when you have a multi-language Drupal or international website.

Hreflang module in Drupal

The Hreflang module automatically adds hreflang tags to your Drupal pages. It has no configuration, it is as easy as activating this module in your Drupal website and enjoy automatically having hreflang tags properly configured.

In Drupal, the Core Content Translation module adds hreflang tags to translated entity pages. However, hreflang tags must be added to all pages, even non-translated ones. This module handles this for you automatically.

You can see more information about the module at: https://www.drupal.org/project/hreflang

Have Any Project in Mind?

If you want to do something in Drupal maybe you can hire me.

Either for consulting, development or maintenance of Drupal websites.