Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

The Hreflang Module

Parent Feed: 
easy hreflang module install and configuration


Credit and Thanks

Thank you to Mark Burdett for creating and maintaining this module.

About the Hreflang module

The Hreflang module automatically adds hreflang tags to your pages. Search engines reference the alternate hreflang tag to serve the correct language or regional URL in search results which is important for multilingual websites.

In Drupal, the Core Content Translation module does add hreflang tags to translated entity pages. However, hreflang tags should be added to all pages, even untranslated ones. This module manages this for you.

Install and Enable the Hreflang module

  1. Install the Hreflang module on your server. (See this page for more instructions on installing modules.)
  2. Go to the Extend page: Click Manage > Extend (Coffee: “extend”) or visit https:///admin/modules.
     installing the hreflang module
  3. Select the checkbox next to Hreflang and click the Install button at the bottom of the page.

There are no permissions to set or further settings to change.

an example of what hreflang looks like in the code

As you can see from the above screenshot in the example website, the hreflang for each different language version of the site has been set by the Hreflang module.

Did you like this walkthrough? Please tell your friends about it!

facebook icon twitter social icon linkedin social icon

Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web