Get a notice from Google Search Console notifying you of “Incorrect hreflang implementation on…“? Don’t worry, you’re not alone. According to a study released by SEMrush which analyzed 20,000 websites, 75% of those sites had
hreflang implementation mistakes. It’s a common problem and one that’s easy to fix: add a link tag in your header with the different languages that your site supports, see the example below.
<!– Format: hreflang="[language-country]" –> <!– English version –> <link rel="alternate" hreflang="en-us" href="https://www.mysite.com.com" /> <!– Spanish version –> <link rel="alternate" hreflang="es-es" href="https://www.mysite.com/es/" /> <!– User preferred version/doesn’t target any specific language –> <link rel="alternate" hreflang="x-default" href="https://www.mysite.com" />
Back in 2011, Google introduced the
hreflang attribute to help website owners and developers increase their site’s visibility to users in multiple countries. With it’s release, thousands upon thousands on sites started getting Incorrect hreflang implementation notices and since has been a relatively common problem people encounter.
When you create similar content in several languages that is specific to different local audiences, it’s worth using the
hreflang attribute to show Google which language you are using on a specific web page. This element helps search engines understand the lingual and geographical targeting of your website. As a result, the right language or country version of your cross-annotated web pages will appear in the correct local version of Google. There are three common ways to implement
- Content with regional variations like
- Content in different languages like
- A combination of different languages and regional variations.
For example, if you create a Spanish-language version of your English-language homepage, you would tag it as “Español” by using
hreflang="es" so that searchers with an IP address that a search engine has reason to believe is in a Spanish-speaking country are served that page in Spanish instead of the English version. This can decrease your bounce rate and increase your conversions by making sure your target audience lands on the version of your page most appropriate for them.
hreflang is a signal, not a directive. That means that other SEO factors may override the
hreflang attribute and cause a different version of your page to rank higher. To give search engines the clearest possible signals about which pages are for users in which language, make sure you’re using other international SEO best practices.
Note: that while Google and Yandex currently use the
hreflang attribute, Bing uses language meta tags instead.
You should use the
hreflang attributes if one of the following applies to you site:
- you have the same content in multiple languages;
- you have content aimed at different geographic regions but in the same language.
It doesn’t matter whether the content you have resides on one domain or multiple domains. You can link variations within the same domain but can also link between domains.
Google supports the ISO 639-1 format for language codes, and you can get more specific by using the ISO 3166-1 Alpha 2 format to signal which region you’re targeting. Not all of the codes are intuitive (for example, the code for the UK is “gb” not “uk”), so double check before pasting the wrong code all over your site.
You can also you this online
hreflang tag generator or polly which is an open-source library for checking
hreflang. You can avoid the Incorrect hreflang implementation notices with tools like those or this list of some common codes:
There’s not a direct one-to-one benefit from having the
hreflang tag, but there are two indirect benefits from an SEO perspective:
If you have a version of a page that you have optimized for the users’ language and location, you want them to land on that page. Having the right language and location dependent information improves their user experience and thus leads to fewer people bouncing back to the search results and helps the amount of time spent on the page. Fewer people bouncing back to the search results leads to higher rankings.
hreflang does not “fix” duplicate content issues, per se. If you have two pages in the same language targeting different regions, such as English in the USA and Canada, the content of those two pages may be so similar that they are considered duplicates. Adding
hreflang tags will not change that. It is still possible that your American page may outrank your Canadian page, if the American page has significantly more link authority, and especially if it has links from Canadian sources.
hreflang attributes will help to alleviate this issue. This is why
hreflang tags are not enough. They provide a technical structure that helps Google sort out and understand your content, but to have a full-fledged international site(s), you need a holistic international marketing strategy that includes building link authority to your site(s) from the relevant countries/languages that you are targeting.
This one is a heartbreaker because often everything is correct except for the simple fact that the
hreflang link referenced is relative rather than absolute. There really is no margin for error with
hreflang tags so make sure you are always using absolute URLs. For example, here’s what NOT to do:
<link rel="alternate" hreflang="en-us" href="/usa/" /> <link rel="alternate" hreflang="en-ca" href="/ca/" />
Google wants to be able to crawl the entire URL path, especially since many times
hreflang tags reference separate ccTLDs or sub-domains.
If you have
hreflang attributes that point to a page that is
noindexed, either with a meta-robots
noindex tag, or blocked in
robots.txt, then Google will report that tag as an error. Google will not be able to follow the return link from that blocked page back to the originating link, so it will report a return tag error. It’s important to note that this does not mean all your tags in a page group will suddenly stop working; it means only the pages that are blocked, and their return links, will stop working. As a general rule of thumb, just don’t create
hreflang tags that point to pages that are blocked from Google’s indexing.
hreflang attribute also can be used along with
rel="canonical" annotations, but
hreflang tags need to reference self-referential canonical URLs. For example, page A should have a canonical tag pointing to page A, page B should have a canonical tag pointing to page B, and page C should have a canonical tag pointing to page C. All three pages should have
hreflang tags that mention all three of the pages in the group. You do not want to canonicalize only one version of a page in a page grouping, as that would interfere with
hreflang annotations. Here’s an example:
<link rel="alternate" hreflang="en-us" href="http://yoursite.com/usa/" /> <link rel="canonical" href="http://yoursite.com/usa/" /> <link rel="alternate" hreflang="en-ca" href="http://yoursite.com/ca/" /> <link rel="canonical" href="http://yoursite.com/ca/" />
This is another common misconception that can trip up even advanced SEO experts. There have been articles published that seem to show that, once
hreflang is correctly implemented across multiple top-level domains or sub-domains, the most authoritative domain gains in link authority. There’s no actual evidence to believe this.
The best way to build link authority and consolidate it across your geo-targeted web pages is to keep your content all on one domain. Use a generic, top-level domain such as a .com, and use the sub-folder method to create your country or language-targeted content.
It’s as simple as adding a link tag in your header with the different languages that your site supports.
hreflang attribute helps website owners and developers increase their site’s visibility for users in multiple countries.
You should use the
hreflang attributes if you have the same content in multiple languages or have content aimed at different geographic regions but in the same language.
There’s not a direct one-to-one benefit from having the
hreflang tag, but there are two indirect benefits. It can help decreases bounce rate which in turn increases time-on-page and may help prevent duplicate content issues.
You can easily avoid Incorrect hreflang implementation notices with just a simple tag… or tags depending on how many versions of a page you have. Just keep in mind, if you’re site isn’t bilingual (though it should)… don’t worry about any of this.
Wanna learn more about international SEO?
Here’s some other great resources on the top, what you should do, what you shouldn’t and common mistakes.