• Español |
  • Deutsch |
  • Русский |
  • Français |
  • Italiano |
  • Português |
  • Türkçe |

WPLANG

WordPress Multilingual

  • Blog
  • About
  • Toolbox
  • Contact
  • Start Here

How To Add Hreflang Tags in WordPress

Posted: 22.03.15 | by Irena Domingo

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.

Insert Hreflang WordPress

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:

hreflang tag wplang

In Google Webmasters Tools you can check if your hreflang tags have been indexed correctly. Go to Search Traffic > International Targeting > Language:

International Targeting Section Hreflang tags

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).

WPML Display hreflang in head section

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

Language Selector Related Plugin

  • 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.

Hreflang manager WordPress

 

 

How do you add hreflang tags to your multilingual WordPress website?

 

 

Categories: Multilingual Websites


About the Author

Irena Domingo's avatar

Irena is the creator of the blog WPLANG (WordPress Multilingual) and a professional specialized in website localization. Irena now helps others to create a WordPress website in one language or create a multilingual WordPress website.

Comments

  1. اخر موضة says

    May 3, 2015 at 3:29 am

    thank you , that’s really helpful

  2. Mega Tours says

    May 13, 2015 at 1:40 am

    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

  3. Shayne says

    July 13, 2015 at 4:36 am

    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?

    • Irena Domingo says

      July 13, 2015 at 4:47 am

      You can not do much more. Note that Google may take 5-6 months o more to crawl hreflang tags

  4. Mega Tours says

    July 15, 2015 at 1:01 am

    Thank a lot of since my website has hreflang tags. I have checked it and found by google.
    Best all
    Mega Tours

  5. john says

    July 20, 2015 at 12:41 am

    Thanks for the useful post.

  6. skillplates says

    October 3, 2015 at 11:21 pm

    Thanks for this nice and helpful tips!

  7. Wall Sticker Murah says

    October 4, 2015 at 5:02 am

    Gotta try this one…!!! ^_^) thanks for the information

  8. Hostings says

    October 6, 2015 at 9:47 am

    It is that I am looking for so long.

  9. Mesin Giling Daging says

    October 15, 2015 at 3:04 am

    Wow,… this is the great one I read… thanks so much for sharing…

  10. Nick Jasuja says

    October 23, 2015 at 8:25 pm

    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

  11. Dinesh Pandey says

    December 21, 2015 at 11:02 am

    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

  12. david says

    January 20, 2016 at 12:39 pm

    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

    • Irena Domingo says

      January 21, 2016 at 3:24 am

      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/

  13. gary says

    February 1, 2016 at 10:16 pm

    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?

    • Irena Domingo says

      February 2, 2016 at 7:19 am

      No, you should use Hreflang tag in multilingual websites.

  14. BigBankClub says

    February 7, 2016 at 6:56 am

    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?

  15. BigBankClub says

    February 7, 2016 at 7:04 am

    I found the solution: http://wplang.org/translation-plugins-languages/

    That is what I was seeking.

    Thank you Irena

    • Irena Domingo says

      February 7, 2016 at 2:43 pm

      Great!

  16. Cor says

    February 9, 2016 at 7:14 am

    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.

  17. jacika says

    February 12, 2016 at 11:32 pm

    Does it auto generate to all in one seo pack

    • Irena Domingo says

      February 17, 2016 at 1:23 pm

      No

  18. AmliJatt says

    March 2, 2016 at 11:35 pm

    awesome thanks for share

  19. VM says

    March 19, 2016 at 9:59 pm

    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

  20. نیازمندی says

    April 30, 2016 at 12:51 am

    thanks to great article;
    is it incumbent to use hreflang tag in one language website or no?

    • Irena Domingo says

      May 1, 2016 at 3:14 pm

      No, you must use hreflang tags in websites in two o more languages

  21. Jay Zee says

    May 25, 2016 at 4:30 pm

    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?

    • Irena Domingo says

      May 26, 2016 at 1:28 pm

      There’s no difference

  22. Sai Chand says

    May 27, 2016 at 8:03 am

    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

  23. Toko obat herbal says

    June 3, 2016 at 5:25 am

    Thank you for your information. Now, I found it in your article and now my hreflang is work

  24. Duryab Aziz says

    June 30, 2016 at 1:27 pm

    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

  25. David Davis says

    July 6, 2016 at 1:19 am

    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.

    • Irena Domingo says

      July 11, 2016 at 8:20 am

      Hi David, it is always good to know that there are new plugins that handles hreflang. Thanks for the link

  26. Talal Masood says

    September 2, 2016 at 5:26 am

    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.

    • Irena Domingo says

      September 7, 2016 at 7:57 am

      You also have this plugin: https://wordpress.org/plugins/hreflang-tags-by-dcgws/

  27. Michael Lauritzen says

    November 18, 2016 at 2:05 am

    Great info thanks.

  28. Sabrina P. says

    December 8, 2016 at 5:04 am

    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

    • Panagiotis Tabakis says

      August 23, 2017 at 4:52 pm

      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.

  29. Kamil Çınar says

    January 15, 2017 at 2:36 am

    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

  30. Eyasir Arafat says

    March 23, 2017 at 11:37 pm

    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?

  31. gardening ideas says

    November 30, 2017 at 12:12 pm

    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

Featured Posts

How To Make A Multilingual WordPress Site: Best Translation Plugins

How To Add Hreflang Tags in WordPress

How To Make Sitemaps In Multiple Languages With WordPress

WordPress Multisite: How to Make a Multilingual Website

How to translate a WordPress theme (or plugin): Poedit & Loco Translate

How To Submit Your Multilingual Website To Google, Bing, Yandex And Baidu

WordPress 100% In My Language

WordPress Multilingual, finally explained

Easy Social Share Buttons: A Plugin For Your Multilingual WordPress Site

WordPress 4.1: Install Language Packs From Dashboard

Twitter

Pages

  • About
  • Blog
  • Contact
  • Homepage
  • Sitemap
  • Tools I Use In My Multilingual WordPress Projects

This website is hosted by Cloudways, powered by WordPress (Genesis Framework and Caroline theme) and accelerated by KeyCDN

© 2014 - 2025 WPLANG: The Complete Guide to a Multilingual WordPress Website

Note that some articles of this blog contains affiliate links, so I make a few bucks if you use them. Thank you very much. Irena