WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

How to Add Hreflang Tags in Your WordPress Site

Last Updated on June 30th, 2023

how to add hreflang tags in your wordpress site

Have you ever wondered whether your WordPress website is getting the attention it deserves from the target audience it was intended to be drawing in? Or, from search engines that showcase your website for your products & services to your intended customers? It’s important that your website in WordPress speaks the same language as your visitors or customers, as well as informs the search engines that it caters to similar languages as your region or intended customers. 

For any organization, which has its online presence for its customers or followers from across the world, it must also be having its website in their native languages, other than the default content penned in English! The important thing to consider is that your WordPress website must identify itself to the search engines as well as your target audience that it has content written specifically in the language they are most comfortable in reading per se. Since you do have the entire website content in various languages, it becomes necessary for informing the search engines, or “aiding in search engine crawling and indexing”, to update their search results to highlight your WordPress website being available in different languages.

Why So Important?

Since most WordPress websites are created in English language initially, having localized versions of them need this tag to specify which language pages it should be loading for the visitors from non-English regions. For example, French visitors will need the search engine to point out the Française or French version of your website, thus when they load your landing page, the browser should seek the French version of your website, and load it automatically for the visitors. Similarly, even for English, which differs in many aspects between the US and UK versions, as well as Australian English as well! 

When you have a different language on your website, the visitor feels comfortable and at home reading content on your website. It makes lucrative to provide localization, which has been proven to have higher conversion rates, and even retention rates for your prospective and existing customers. 

On the same lines, we can understand that search engines will prioritize any websites that are available in a localized form for visitors of non-English regions; or even variants of English in fact! Considering this fact, it goes without saying that, a localized website will rank higher than its counterparts or competitors, who may not have any localized versions of their website. Or, even if so, haven’t updated the website with having the necessary tags or code, which provides this information to the search engines about all those pages available as localized versions of pages on the website! 

Furthermore, having website pages translated and localized for various regions across the world, speaks volumes about your company which has gone lengths to make these different people around the world at home when browsing pages on your website! This is called as ‘improving user experience’! An enhanced or enriched user experience is all about giving visitors to your websites a smoother browsing feel when reading information about products and services on it. 

Consider this, for non-native English speaking visitors reading information on your website, there could be some information lost in translation, or sometimes even miscommunicated. In the direst situations, you wouldn’t any potential customer from having misguided or misinformation about your website, products, services, or about your company in general! Therefore, it becomes imperative to have the localization in place for all those pages that would be visited for sure. 

Many a times, it pays to have your web pages speak local lingo, with few slangs or local parlances thrown in, to make the readers feel a connection with; a bond made here which will go a long way in conversions and retaining these very customers as your loyal fan-followers for a long time to come! This is ‘Providing a better User Experience’ to your visitors! 

Lastly, but definitely not the least is reduction in your website’s bounce rate. “What’s that now?’, you must be wondering, right? Just as we’ve been discussing that, anybody who might not be a native English-speaking person, might find it difficult to read further or in detail, any or all information on your website. Much rather stay longer to read more, since unwillingly they can’t read further any more as they can’t understand a word of it. Consequently, they will soon take off to any other website, in most cases, your competitors’ website or any other alternative where they can understand the content, and therefore, leading to seeking products or services they want.

Instantly leaving the website from the first or landing page is called bouncing off, leading to higher bounce rates. The greater number of people leave reading the first page of your website, the higher the bounce rate. Which is detrimental to the health and the rankings of your website. Whenever visitors bounce off your website, search engines take a note of it, and rank your website lower – deeming it to be of least use for everyone. Thereby over time, you will lose ranking positions. 

Article Continues Below

And today, it is a Herculean task to get your website rankings up against such great competition in the digital world! By having visitors stick around your website, browsing more than the initial landing page, is a sure shot way to reduce bounce rates. Additionally, translating to more tangible business conversion results too, including but not limited to increased course sign-ups and order volumes!

So, importantly, how would you add hreflang to WordPress? Let us move ahead, and find out!

As with websites, are simple lines of code in HTML, a simple yet most important HTML piece of code – hreflang – proves to be a boon for making your website regional-language-friendly! In fact, it has become a de facto standard to have your WordPress website provide information about which languages it is localized for. That’s why, we’re here guiding you about, ‘how to add hreflang in WordPress”.

All this through a simple insertion of code using the wordpress hreflang tags or hreflang HTML tag in the initial section of your website pages. Leading search engines refer to the WordPress hreflang tags, and display the respective language and regional variant of a web page to people searching products and services that you have to offer!

Moreover, as per the recent updates and SERP rankings updates from Google, WordPress ‘hreflang’ tags are integral as part of your localization process! Even though it be in English, but it pays, when you have included the tag for announcing that your website caters to an English-speaking region. Such as USA or UK (EU), where the ‘rel=“alternate” hreflang=“en-us”, or ‘rel=“alternate” hreflang=“en-uk”, much similarly goes for Canada (en-ca), and Australia (en-au). 

The correct method to insert or add the ‘hreflang’ tag into the existing web pages of your website can be described as under.

  • Initially, ensure that you have the SEO plugin installed & activated in your WordPress installation. There are multiple choices of WordPress SEO Plugins out there to choose from the WordPress repository, which will help you add the WordPress hreflang tag quite easily.
  • Configure the plugin by accessing it from the Dashboard, proceeding to enabling the hreflang functionality.
  • Once, inside the plugin settings, seek and verify that the ‘hreflang’ is enabled. If not, click to Enable it. Usually, it is labeled as “Enable hreflang tags. Turn it to ‘On’, Next.
  • Within the plugin settings, select your language and regional variations of your website as per the site structure of the webpages. Select the correct values depending on language and country.
  • As the correct the language and regional variations are now defined for your entire website, you need to assign these WordPress hreflang tags to the existing content, by either creating newer pages or editing the pages or post.
    • Note: on every new page you create or edit, the SEO plugin, which we added at the beginning of this guide, will provide a space for entering or specifying the hreflang tags WordPress information. Don’t forget to every new page you add to your website. 
  • The WordPress hreflang values comprise the language code, along with the country/region code. For English in the United States, we need to use the “en-us” as values in the field space provided. For codes of other countries, refer to the Official Hreflang Code Page.
    • Each different language and regional variation will require entering separate values for that page distinctively. 
  • Lastly, Save & Update your post or webpage, which will trigger the SEO Plugin into rendering the necessary hreflang WordPress tags, and adding them to the WordPress code of your website.

That’s it, Voila! Your site is ready for global visitors, and ranking up in prominent search engines!

For verifying, you can use any prominent third-party SEO auditing tools, or even Google Search Console for validating and rectifying for any issues or errors with your WordPress hreflang tags.

Into the bargain, do not forget to the above steps for each page or post that has language or regional variations, as required.

FAQs

Article Continues Below

How do I link a language in WordPress?

Through the Dashboard, go to the Appearance > Menus page, head over to Click on the ‘Language Switcher’ tab in the left column. Select from the available languages you wish to display, and Click on ‘Add to Menu’. The WordPress navigation menu now displays all the languages you added.

What are the requirements for hreflang?

The ‘hreflang’ attribute must contain a value comprising the language, combined with the region it belongs to.

What is the difference between href and hreflang?

The ‘href’ attribute informs web browsers or search engines of the original URL of the alternate web page. Whereas, the ‘hreflang=’ attribute particularizes the language and country this web page is intended for targeting audience specific to the region or their spoken language.

A team of WordPress experts that love to test out new WordPress related software, WordPress plugins and WordPress themes.