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