The implementation of hreflang attributes in a WordPress website can be a complicated process without a specific plugin. In this post I show you how to add hreflang tags in WordPress using translation plugins and specific plugins.
1. What are hreflang attributes?
In 2010 Google introduced new SEO attributes for multilingual sites: rel=”alternate” and hreflang=”x”. Google uses these attributes to serve the correct language in search results.
Example of hreflang in header:
In Google Webmasters Tools you can check if your hreflang tags have been indexed correctly. Go to Search Traffic > International Targeting > Language:
You can insert hreflang tags in one of three ways:
- HTML link in header. The most common way.
- Sitemap. You can submit language version information in a Sitemap (Article: How To Make Sitemaps In Multiple Languages With WordPress)
- HTTP header (if you publish non-HTML files like PDFs)
2. How can you add hreflang tags in WordPress?
2.1. Using translation plugins
WordPress SEO by Yoast does not allow you to add hreflang tags, but some translation plugins can automatically add these attributes in your website as an HTML link.
For example, if you’re using WPML (premium plugin), you have an option in settings to display alternative languages in the head section using hreflang attributes. WPML is a great plugin for multilingual SEO because you can use it with WordPress SEO by Yoast (article: Using WordPress SEO with WPML).
Other plugins like Polylang, Multilingual Press or Multisite Language Switcher also allow you to add hreflang attributes.
2.2. Using specific plugins
Also you can add hreflang attributes using two plugins:
- Language selector related (free plugin). This plugin allows you insert hreflang attributes in your posts, pages, categories and tags, even if your websites are located in different hostings. You’ll have to install the plugin on each language version. Also, you can include a language selector as a widget in sidebar, header or footer
- Hreflang Manager Codecanyon (premium plugin). With a menu in the WordPress dashboard you can connect pages and posts of your different websites. The plugin will automatically add the proper html markup in the HEAD section of the selected pages and post. It costs $ 14.
How do you add hreflang tags to your multilingual WordPress website?
thank you , that’s really helpful
Thank you for information, exactly i am looking for the information above.
I will try to put on my website.
Best all
Yuventius, the owner of Megatours.co.id
Thanks for the great information!! 🙂 I wanted to ask you if you had experience when Google still doesn’t pick up your hreflang tags even though the settings in WPML are to “Display alternative language in HEAD section”is checked? Thats actually how I stumbled across your post here, is to find a way to get google to pick up my second language. Any ideas?
You can not do much more. Note that Google may take 5-6 months o more to crawl hreflang tags
Thank a lot of since my website has hreflang tags. I have checked it and found by google.
Best all
Mega Tours
Thanks for the useful post.
Thanks for this nice and helpful tips!
Gotta try this one…!!! ^_^) thanks for the information
It is that I am looking for so long.
Wow,… this is the great one I read… thanks so much for sharing…
This is great info. But Hreflang is complicated. There are too many ways to screw it up. I have published a free online tool to test Hreflang implementation. It is at app.hreflang.org. PS – Irena, even your blog has errors in its Hreflang implementation. See https://app.hreflang.org/results.php?runid=d25fe373fa99a45a39a0140e02a58c3f20151023171951
Yes, hreflang is something which many people just miss although it is very useful.
Appreciate this article on hreflang
Dinesh Pandey
http://www.StegWelt.com
Hi Irena,
Thank you for this vakluable information.
I have a question: I am creating a wordpress website to promote my day tours business in Portugal but since i speak german and am planning to have a german version of the website I would like to have the german version of the site ( http://www.example.net/de) to target Germany ( or german speaking countries) in google.de while keeping the English version ( http://www.example.net/en) targeting visitors from all over the world, is that possible?
Thank You
David
Yes, it’s possible. Because you are using a generic domain (.net) you can configure in Google Webmasters Tools a different geographical orientation for each subdirectory. More info in this article: http://wplang.org/hosting-location-geotargeting-seo-cdn/
it should be automatic , when you select the sites language in your wordpress settings no?
because with yoast, there is no option to select a site language
but if you go to the wordpress settings>>>>general
you can set the site language there
is that not the same thing as your talking about?
No, you should use Hreflang tag in multilingual websites.
Based on this concept, is there an additional blog or any information that would best suggest the means to translate?
Meaning which plugin serves as the best solution to make a website truly recognized in their respective languages. Or they all work the same?
I found the solution: http://wplang.org/translation-plugins-languages/
That is what I was seeking.
Thank you Irena
Great!
Hi Irena,
Do you think there is a difference between the hreflang tags.
I have seen two different versions:
First hreflang= or first href=
Most likely they are both usable.
I made my website with domainname.nl and I now know it would by better with .com. I hope the hreflang tag will help.
Thanks for the useful post.
Does it auto generate to all in one seo pack
No
awesome thanks for share
Hello,
thank you for useful link. But I have question, will adding hreflang work? I have national domain, but I would like to add post in English. In GWT is country added to national domain and to my country.
Other option is buy .com or .net domain for blog. I have no monetization ambitions with blog, trying to rewrite useful stuff. But now google do not see any my English content.
Thank you one more time.
Vaclav
http://blog.vaclavmalek.cz
thanks to great article;
is it incumbent to use hreflang tag in one language website or no?
No, you must use hreflang tags in websites in two o more languages
Very informative and easily understandble. Is there a difference in the way HREFLANG should be used if the single-site multi-lingual wordpress installation is using a subdomain or subdirectory for each language?
There’s no difference
It is not working for me languages tags are not showing in my website 🙂
i added the Language Selector Related plugin i got in add/edit post page but in my website it is not showing
Thank you for your information. Now, I found it in your article and now my hreflang is work
Hi, Thanks for every thing you have shared in this post..
I was searching to add lang tag in my wordpress site and just tapped on your link.. It helped me..
Thanks again..
Regards: Duryab Aziz
Actually, there is a new plugin that handles hreflang tags in WordPress. It’s HREFLANG Tags Lite and it is available free on WordPress.org, https://wordpress.org/plugins/hreflang-tags-by-dcgws/.
The Pro version which only costs $5 for a single domain even has a verification tool.
Disclaimer: I am the plugin developer.
Hi David, it is always good to know that there are new plugins that handles hreflang. Thanks for the link
Hi Irena,
You mentioned about a plugin “Language selector Related” in your post. This plugin is almost 2 years old and has not been updated ever since. Your post is over a year old as well now. I was wondering if you came across any new good plugin that is similar to this? Because from the screenshots it looks like that this plugins actually allow you to add the hreflang links on every post and pages itself. Not like the hreflang manager where you have to put the links and hreflang links in a separate screen. Actually I’m working on a website that is in a specific language in wordpress, but the English version is hosted somewhere else and is not even wordpress. So I need to create a linking between them.
I would be grateful if you can help me out.
You also have this plugin: https://wordpress.org/plugins/hreflang-tags-by-dcgws/
Great info thanks.
Hi, thanks for the info.
The “problem” with my site is that there are 2 versions of the same language: PT-PT and PT-BR, is there any way to have both? (the text is absolutely the same and it makes no difference at all for the readers)
I am having another “problem” with the localization, this may be off topic if so please apologise.
My tld is .co.uk but the website is in Portuguese because is a portal for the Portuguese speakers living in the UK. http://www.lusotimes.co.uk
On webmaster tools “international targeting” they advise to use “unlisted” if we don’t want a specific country however that option is not showing. (I want every country where people who speaks portuguese to be targeted, not just the UK)
Any tips would be more than welcome.
Thanks
It should probably be at the end of the list. It was translated in my language as “Out of list”, while it should be translated as “Unlisted”, and it was in the very bottom of the list.
Thank you for information, exactly i am looking for the information above.
I will try to put on my website.
Best all
samsun evden eve nakliyat http://www.samsunevdenevenakliyat.com.tr
I have a new blog with wordpress and was looking for these information to target my audience.
If my site wrote in only one language then, should I need to mention hreflang for a better ranking in local lavel?
My have a new blog with WordPress, It have no hreflang tags. how to add hreflang tags in my website. please anyone suggest me. http://www.omorfaruk.com