Share on linkedin
Share on twitter
Share on facebook

How do you fix the “your site has no hreflang tags” issue? Check out our hacks!

Share on linkedin
Share on twitter
Share on facebook

If you’re setting up a multilingual website, it’s absolutely essential to implement hreflang tags correctly. But if you’re getting the “your site has no hreflang tags” message on Google Search Console, it’s a sign that something’s not quite right.

Don’t worry, it’s fixable—but you need to act fast.

If Google can’t find your hreflang tags, it won’t be indexing the different language variations of your web pages correctly, which means you’re probably losing traffic.

Fortunately, it shouldn’t take long to identify the issue and rectify it. 

All you have to do is read on and we’ll explain exactly what the “your site has no hreflang tags” error code means and what might be causing it. We’ll then share some quick-fix hacks that you can use to correct the problem.

We’ll also be telling you everything you need to know about hreflang tags, why they matter, and how to properly add them to your website.

What are hreflang tags?

Hreflang tags are little snippets of code that tell search engines like Google what language the content on any given page on your site is written in, what geographical region it’s intended for, and how it relates to other pages on your site. 

They look like this:

<link rel="alternate" hreflang="en-ca" href="http://www.example.com/ca/" />

As you can see in our above example, there are three different HTML attributes within this snippet: a rel attribute, a hreflang attribute, and a href attribute.

The href attribute specifies the page we want to tell the search engines about. In this case, it’s the Canadian version of the example site (example.com/ca). 

The hreflang attribute identifies the language and (optionally) region that the page is intended for. In this case, the attribute (en-ca) tells us the page is written in English (en) and intended for users in Canada (ca). 

It’s only essential to specify the language. You don’t have to specify a region unless you want to. You also must use the official two-letter language and country codes. A list of all language codes can be found here and country codes here.

The rel attribute tells the search engine how that page relates to other pages on your site. ‘Alternate’ tells it that this example page is a variation of another page and that it shouldn’t be surprised if the content is similar to other pages on your site.

Why hreflang tags matter

Hreflang tags are essential for any website that has different page variations with the same content in multiple languages. Here’s why.

User experience

Search engines like to provide the most relevant results to the user. This means showing them localized variations of web pages in their local language whenever possible. As a result, Google will typically rank localized web pages at the top of the results page. 

For example, let’s imagine a hypothetical internet user in the US inputs a search query into Google written in German. Google knows that webpage “A” best answers the search query, so it wants to show it in position 1 in the SERPs. 

However, there’s a problem: webpage “A” is multilingual, so there are multiple different variations of the same webpage to choose from. There’s an English version, a French version, and a German version. 

So what does Google do? It does what you’d expect: it pushes the German version to the top of the page.

But here’s the thing: the only way search engines like Google know what language each of those web pages is written in is by reading the hreflang tags. 

If your site has no hreflang tags set up, Google might end up ranking the page with the wrong language for the searcher (for example, an English page variation for a German speaker)

This negatively impacts the user experience. If a user is directed to a page on your website with content written in a language they can’t read, they probably won’t stick around long enough to find your language switcher. 

SEO

Hreflang tags are also important from an international SEO perspective. 

Duplicate content is bad for SEO. If a search engine like Google notices duplicate content on your site, it sends a bad signal that can negatively impact your ranking power. And when you have multiple versions of your web pages in different languages, it looks like duplicate content. 

Fortunately, we can tell search engines that it isn’t duplicate content by adding that ‘alternate’ attribute that we mentioned earlier within our hreflang tags 

If your site has no hreflang tags, search engines might assume your multilingual pages are duplicate content and hide them from the SERPs entirely.

The trouble with hreflang tags

Hreflang tags seem pretty straightforward on the surface, but they’re actually super complicated to get right. In fact, Google’s very own senior webmaster trends analyst John Mueller called them ‘one of the most complex aspects of SEO’

Tweet about hreflang tags complexity

The reason they’re so complicated is that hreflang tags are bidirectional. To implement them correctly, every URL needs return links to every other URL.  If you have a lot of languages on your website, this gets messy quickly. If there are 50 language versions on your site, you’ll need hreflang links to different URLs on every single multilingual page.

Not only that, but there are a lot of easy mistakes to make and things that can break the implementation, like if you delete a language and forget to update all of your hreflang tags, or if you don’t set the rel attributes correctly. 

If you’re not a developer, you’ll need basic code skills and a good understanding of HTML to know what you’re doing.

Aside from the technical aspects, there are logistical complications too. You need to think carefully about how to set up your page variations for different regions for the best possible user experience, which can get complicated. 

For example, if you serve customers in the UK and US in different currencies, you’ll probably want to set up both an en-us (US) and an en-gb (UK) page variation to show prices in their local currency even if they are both English speakers.

How to add hreflang tags to your website

If your site has no hreflang tags yet, there are two ways to add them: the easy way (with a plugin) and the hard way (manually).

1. Add them manually

If you’re a developer or code-savvy and you’re up for a challenge, you can add hreflang tags to your website manually, either into your HTML headers or your XML sitemap.

HTML Headers

To add them to your HTML Headers, you’ll need to navigate to the <head> section of each multilingual page. 

From there, you’ll want to paste in your hreflang tags. The hreflang attribute on each page needs to include a reference to both itself as well as all of its alternate pages in each different language. 

The hreflang code snippet you’ll need to paste in will depend on what languages/regions you’re service and your page URLs, but it should look something like this:

<link rel="alternate" href="https://www.examplesite.com/" hreflang="en" />
<link rel="alternate" href="https://www.examplesite.com/en-gb/" hreflang="en-gb" />
<link rel="alternate" href="https://www.examplesite.com/en-us/" hreflang="en-us" />

The problem with this method is that you’re adding quite a few lines of code to each of your pages that your users won’t be able to see but will still have to download when they open the page.

If you have dozens of alternates in different languages, you’ll need to add dozens of link elements to every page, which can add a couple of KB to your page size and significantly increase page load times. 

This might not seem like a big deal, but page load times matter more than you might think. 

Recent updates to the Google Algorithm have placed greater emphasis on so-called ‘page experience metrics’ like speed. As a result, Google prefers to rank websites that load faster over slower sites. Even a fraction of a second can make a huge difference to your SEO.

XML Sitemap

If your site has no hreflang tags yet but you don’t want your hreflang implementation to impact your load times, you can add them to your XML sitemap instead. 

Your sitemap is the document you submit to search engines that lays out a ‘map’ of all the pages and files on your website to help ensure they’re indexed correctly. 

If your site has no hreflang tags, you can add a snippet of code in here to indicate all the alternate versions of each page. It should look something like this:

<url>
<loc>http://examplesite.com</loc>
<xhtml:link rel="alternate" "hreflang="fr-fr" href="http://examplesite.com/fr/"/>
</url>
<url>
<loc>http://examplesite.com/fr/</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="http://examplesite.com/"/>

As you might have noticed, the structure is a little different here as we’re working with an XML file instead of HTML. However, the basic idea is still the same: each tag includes a rel, hreflang, and href attribute, and they’re always bidirectional.

Aside from eliminating unnecessary on-page code and speeding up loading times, another advantage of this method is that it’s safer. Modifying your page headers directly can cause problems if you make a mistake, whereas messing up your XML sitemap is less of a big deal.

Arguably, this approach can speed up loading times on your website since you’re not adding code directly within your HTML headers. However, in practice, the impact is almost always negligible.

In any case, it’s safer to edit your sitemap than it is to modify your theme files. However, the more languages your website uses, the more complex this implementation becomes.

2. Use a plugin

Adding hreflang tags manually is a lot of work and can easily go wrong. 

That’s why in most cases, it’s a much better idea to just use a plugin. A good translation plugin like Weglot will automatically implement hreflang tags for each language your site uses during the translation process. It’s simple, safe, and fast—it only takes a few clicks.

Here’s how to do it:

First, sign up for a Weglot plan that fits your needs.

Overview of Weglot plans

If you’re a WordPress user, navigate to ‘add a new plugin’ from your WordPress dashboard and search for and install the Weglot plugin.

You can add Weglot directly from your WordPress navigator

Navigate to the Weglot settings page and insert your Weglot account API key. Next, specify the original language of your website, choose the languages you want your website to be translated into, and hit save.

The Weglot configuration screen is very intuitive

It’s as simple as that.

Weglot will now automatically take care of the whole translation process for you. It’ll translate your site into all your destination languages, set up a subdirectory for each of them, and automatically implement the hreflang tag. 

If you want to tweak the translation, you can do so from your Weglot dashboard.

Troubleshooting the “your site has no hreflang tags” error

If you’ve done all of the above and you’re still seeing the “your site has no hreflang tags error” on Google Search Console, there may be a problem with your implementation. 

The issue could be a number of things, so you’ll need to do some troubleshooting to find out exactly what the problem is. Here are some things to check:

  • Check bidirectional links. Make sure you’ve implemented return links on all of your multilingual pages. For example, if your English page links to your Spanish page, your Spanish page must also link to your English page. If you don’t have return links set up correctly, it could trigger the “your site has no hreflang tags” error.
  • Update your implementation when a page is deleted. Whenever a page on your site is deleted or redirected, make sure its counterparts are updated. 
  • Make sure you’ve used self-referencing canonical links. Each page should include a rel=”canonical” link that points back to itself, as well as links to all its alternates. 
  • Use x-default tags. The x-default hreflang attribute specifies the default version of the page to which users should be sent if none of your pages match their language settings. You should always use an x-default tag as a final catch-all.
  • Make sure you’ve used official language/region codes. You must use ISO 639-1 language codes and ISO 3166-1 region codes in the correct format. 

Weglot has also developed a hreflang checker tool that you can use to double-check your implementation. 

The Weglot hreflang checker tool

Just head over to our hreflang checker page, enter the URL of your site, select a search engine, and click ‘Test URL’ to make sure everything has been set up correctly. If your site has no hreflang tags or there’s a problem with your implementation, it’ll show up here.

Final thoughts

There you have it—everything you need to know to fix the ‘your site has no hreflang tags’ issue. Just remember to audit your site regularly and update it whenever pages are deleted or redirected, and you should be fine!

Also bear in mind that Google can take a while to re-index your site so after you’ve implemented the hreflang fixes, you may need to wait a couple of days before the “your site has no hreflang tags” notification disappears. 

As you can see, hreflang tags can be complicated, but they don’t have to be.

Most of the issues people usually run into arise from mistakes made during manual implementation and can be avoided entirely with the use of a plugin. That’s why we’d highly recommend using Weglot to save yourself from headaches later down the line. 

If you’re interested, you can sign up for a free trial here.

Good luck!

About the author
READY TO GET STARTED?
The best way to understand the power of Weglot is to see it for yourself. Get your website multilingual live in minutes.
Cookies settings
We use cookies to collect and analyze information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy
Necessary cookies

Some cookies are required to provide core functionality. The website won’t function properly without these cookies and they are enabled by default and cannot be disabled.

Non-necessary Cookie Settings

Any cookies that may not be particularly necessary for the website to function and is used specifically to remember preferences or to help us improve our website by collecting and reporting information on its usage.

Free guide

Your best practice guide for translating a website
We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy
Subscribe to our newsletter

Stay up to date with the latest Weglot news and tips!