Share on linkedin
Share on twitter
Share on facebook

How do you fix the “your site has no hreflang tags” issue?

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’ll end up 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 fixes 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.


Get the most critical part of your multilingual SEO mix right by using Weglot to set up your hreflang tags (automatically).

Sign up for a free trial now!


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 it or to any other pages on your site specified here.


Ensure that search engines don’t see your localized pages as duplicate content by setting up your hreflang tags correctly. Get this done for you — automatically with Weglot.

Sign up for a free trial now!


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 calls 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, there are a lot of easy mistakes to make that can break the implementation, like deleting a language but forgetting to update all of the hreflang tags to reflect the same or incorrectly setting up attributes. 

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, US, and Australia in different currencies, you’ll probably want to set up an en-us (US), an en-gb (UK), and an en-au variation showing prices in local currencies even if they’re all targeting English speakers.


Hreflang tags are a core element of your multilingual SEO mix. Let Weglot take care of them for you and help search engines like Google and Bing understand your translated pages better and serve just the right version each time a user searches in their native language.

Sign up for a free trial now!


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). Let’s first see the more difficult version.

Adding hreflang tags to a website manually

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

Adding hreflang tags manually via HTML headers

To add hreflang tags manually inside your HTML headers, you’ll need to navigate to the <head> section of each multilingual page on your website. 

Within your header code, you’d need 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 serving 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.  Imagine how your user experience would get impacted if your homepage took a few more milliseconds to load.

Perhaps this won’t 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 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.

Adding hreflang tags manually via an 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 won’t impact your website’s loading time since you’re not adding code directly within your HTML headers.

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 your XML hreflang implementation becomes.

Adding hreflang tags to a website with a plugin (and avoiding the “your site has no hreflang tags” issue!)

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 in your hreflang annotations:

  • 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, as missing return tags can make search engines feel lost.
  • Update your implementation when a page is deleted. Whenever a page on your site is deleted or redirected, make sure your linking reflects it.
  • Make sure you’ve used self-referencing canonical URLs. Each page should include a rel=”canonical” tag 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 a 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 to diagnose if you have the your site has no hreflang tags error!

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 highly recommend using Weglot to take care of your hreflang tags. Sign up for a free trial now.

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!