Hreflang Tags Usage for Localization

Hreflang Tags

The Hreflang tags were first introduced by Google in December of 2011, and they were designed to allow site owners to show the relationship between pages of similar content, but in different languages. This is to help the search engines to serve the correct results to users searching in a specified language.

For example, if you create a English-language version of your Spanish-language homepage, you would tag it as “English” by using hreflang=”en” so that searchers with an IP address that a search engine has reason to believe is in a English-speaking country are served that page in English instead of the Spanish version. This can reduce your bounce rate and improve your conversions by ensuring your target audience lands on the version of your page most suitable for them.

Here is how you would write that tag:

<link rel="alternate" href="" hreflang="en-us"/>

The “en” in the hreflang tag means English and the “-us” is the regional identifier, United States. If your content was targeting English-speakers in London, you would use “en-gb”, for Great Britain. However, you are not required to use the regional identifier. Here is another example of proper implementation.

<link rel="alternate" href="" hreflang="en-us"/>
<link rel="alternate" href="" hreflang="fr"/>
<link rel="alternate" href="" hreflang="it"/>
<link rel="alternate" href="" hreflang="es-mx"/>

HREFLANG Tags Plugin for WordPress

As you can tell, this is easy to implement if you have a static HTML site. But, for us users of WordPress, it is much harder. Since most themes contain a single header.php file where all of the content in the <head> is placed, you can imagine how this would be a problem. If you were to paste the above code in the <head> section in header.php then what you are effectively telling the search engines is that every single post and page in my site has an alternative link which points to the homepage of that site. This is wrong and will hurt your rankings and not help.

So, what we have done is to create a small, light-weight plugin that effectively handles your hreflang tags on a per-page, per-post basis. Here is how it works:

  1. Go to Plugins -> Add New and search for “HREFLANG Tags”. Our plugin is currently the 1st result and looks like this: hreflang tags search result
  2. Go ahead and click Install Now to install our plugin.
  3. Go to the Page or Post that you want to add hreflang tags on and go to the Edit Post screen. Towards the bottom of the screen you will see a new meta box named “HREFLANG Tags”. Here you will see an input box for Alternative URL and a dropdown select for Language. You can add as many as required for your page. Then click Update to update the page/post as usual.

That’s it. It’s really that simple to use.

If you have any questions or concerns regarding this plugin, or would like to see new features for this plugin, feel free to contact us using this form, or you may call us at +63 44 769 4023 or Skype us at dcgws_internet_solutions. If you would like us to create a specific plugin for your WordPress site, you may request a quote.

Leave a Reply

Your email address will not be published. Required fields are marked *