Incredibly useful in the modern world, where your internet audience could span a hundred different countries, Hreflang tags allow your site to direct people to the version of your site with the most appropriate language for their location from google searches.
However, they can go further than just language, allowing you to direct to region specific sites as well, for instance American and United Kingdom sites, where both would be English language, but offer different currency or other localized content.
For local search SEO they can be very useful, as well as enhancing the visitor experience, but there is much confusion around the use of Hreflang tags, so here is a guide to adding Hreflang tags to your WordPress site quickly and easily.
What is needed for Hreflang to work correctly?
The first thing to think about when using Hreflang tags is that the site is set up correctly to use them.
Hreflang tags tell google about content that is the same, other than language or localization, trying to use the tags on content that is different in other ways will confuse Google and affect your search results.
For adding Hreflang tags to WordPress then, make sure you are working with content that is identical apart from language or similar localizations.
Adding Hreflang tags to your WordPress page
The tags themselves must be placed inside the document header, and they appear like this:
As you can see the Hreflang tags contain an attribute of a two-letter code that references the appropriate language, with an optional extension that references a specific region, such as en-us and en-gb for English language American region localization and United Kingdom region localization specifically.
In the illustration, the default page is United Kingdom English, the others are German and French.
You can find a list of the various language attributes available here.
For Google to process the Hreflang tags correctly, each version must be included in the HTML header, that includes each individual language version as well as any additional localized versions that share language.
This entry is repeated in the HTML header for each version to ensure that Google identifies and displays the right version for visitors each time.
Each document set must be complete.
For the tags to function correctly with Google, there must be a link from each language version to every other language version, and they must also link to themselves.
A diagram will explain things clearly
As can be seen, each version of the site links to every other version, but just as importantly, links back to itself.
Despite the reputation for difficulty, the actual process of adding the new tags into the HTML header itself is not too difficult, ensuring all the site documents link to each other and themselves, and are the same is the crucial part, and this is where most problems with Hreflang tags come from.
Work through the documents and make sure all the links required, one to each of the other documents plus a link to itself, is included, and things will work as expected.
What options are available to make this easier and faster to do?
There are some options available if you want automatic solutions to Hreflang tags in wordpress, with the free language selector related plugin allowing you to insert Hreflang attributes into all parts of your WordPress site, including tags, posts, pages and categories.
For this specific plugin, it must be installed on each different language version of the site.
Another option is to use a complete multilingual plugin, again there are free options, one of which is Polylang, and provides an easy to use interface to manage your multilingual content and use Hreflang tags easily.
There are also paid for options, the most commonly used is WMPL, which is perhaps the most comprehensive toolset for multilingual WordPress content out there.
Again, it provides and easy to use, easy to follow interface that makes adding Hreflang tags simplicity itself. In fact, as you build your WordPress site with WMPL it adds in Hreflang tags automatically for you.
Whichever route you take to set up Hreflang tags on your WordPress site, once it is done everything needs checking to make sure it works correctly.
The good news is that Google have made this simple to do, simply log into your Google webmasters account and after selecting the site you wish to check, navigate through the menus from Search Traffic and then to International Targeting.
Here you will find both language and country tags, so check the ones that are relevant to the site you are working on.
What you will then see is a count of the items that have associated Hreflang link attributes, hopefully it should show all as fine with no errors.
If you do get errors, Google Webmaster will show you a warning of where the errors are. Problems can be missing Hreflang tags for versions or mismatched Hreflang tags.
Google will present a list of any issues it finds, and clicking on each one displays a list of URLs that are causing trouble, so you can quickly check specific URLs rather than having to look through the whole site.
Hreflang tags have a reputation of being extremely complicated and difficult to manage, and while they definitely take more thought than many aspects of WordPress, being methodical with language versions and adding in the tags themselves and above all making sure the appropriate links are all in place, will lead to success. You can also use Hreflang Tags with yoast plugin as well.
The benefits for localized versions for both search results and visitor satisfaction make this extra effort well worthwhile, so get those Hreflang tags in your WordPress site today.