There are multiple tools and methods you can use to provide an outstanding experience for your customers, especially when you sell globally. However, not many of them might be as important as hreflang tags since they influence not only customers' experience but SEO as well.

At the same time, hreflang tags are one of the most confusing factors of international SEO. It is not as easy to implement as it is to make a mistake that can cost you brand visibility, targeting and ranking.

So, before you start implementing these tags, you have to review the most common hreflang mistakes, to know how to prevent or fix them.

In this article, you will review the examples of hreflang tags with errors and learn how to avoid them. Moreover, if you’re in a Magento 2 world, you will find a solution for most hreflang mistakes that allows you to implement hreflang tags in a few clicks.

Shall we start?

Post Contents [hide]

    No Return Hreflang Tags

    When you add hreflang tags to your website pages, you have to remember that all of them have to contain the return tags. Otherwise, you might see the “No Return Tags” issue notice in Google Search Console.

    What does it mean?

    If you have three alternative pages, you can’t add hreflang tags to only one of them and expect it to work out. In other words, Page A should have links to Pages B and C, while Page B should link to Page A and C, etc. 

    You get the idea.

    Search engines analyze all pages. So, all pages you have set hreflang tags for should cross-reference each other. Check if your original page has links to alternative pages and vise versa not to confuse the search crawlers.

    Hreflang Mistakes

    No Self-referencing Tags

    Missing self-referencing hreflang tags is the second most common hreflang mistake a lot of websites face. Though you double-check it a few times and make sure to add return tags from all pages, don’t forget about self-referencing hreflangs.

    This error is considered to be a source-code issue and may lead to misinterpretation and indexing issues. Thus, except for all alternative pages, the original page should link to itself, including the language and country code, if applicable.

    No Selt-referencing Href Tags

    Wrong Country/Language Codes

    Google and other search engines analyze language and language-country matches to decide which page to pull out for localized search queries.

    ISO language and country codes are globally recognized codes you should use for hreflangs. Otherwise, it will be hard for Google to interpret your international website. Besides, a great deal of hreflang tags with errors appear because of the country code misuse.

    Remember, you can use language code without county code, but not the other way around. Moreover, as it was already said, Google analyses language match first. So, language code should always come before country code.

    After all, you add hreflang tags to almost all pages of your website. Imagine how it would feel to find out you have to edit all of them because of a small language code mistake.

    Make sure to take time and double-check the language and region codes before adding hreflangs to your website pages.

    Wrong Language Code in Hreflang Tags

    Hreflang Tags Punctuation Errors and Typos

    Surprisingly, almost all hreflang mistakes are related to the language and county codes. Even if you're using the right ISO codes in the right order, you should also pay attention to the punctuation and typos.

    Though some technicians tend to use underscore "_", it is not the way it should be with hreflang tags. Always use dashes "-", regardless of the method you implement hreflang tags with, to avoid any indexing errors.

    Another issue that confuses the search engines and may prevent your page from ranking is typos in language or country codes.

    There is no precaution for this, but if you mistakenly set "fi" code for a french-language page, it can have a result opposite to what you expect. So, any mismatch between the language code and the language of the page can lead to issues.

    Keep that in mind when implementing hreflang tags.

    Typos in Hreflang Tags

    Missing X-default Tag

    The x-default tag tells that a page doesn’t target any specific language or region. It is the page search engines should resort to when there is no language and country match for the customer's request.

    For example, you have pages in English, French and German and all of them cross-reference each other. When Spanish-speaking customers from Spain type a search request Google has to find relevant results for them.

    Since you only have hreflang tags to English, French and German languages, it may struggle to choose what page to pull out. Google will display some of these three languages eventually, but it might not serve your intend.

    To avoid this and ensure your customers receive the best experience, specify the international or default page with the x-default tag. While it is not obligatory, it still has certain SEO value.

    Invalid Hreflang URLs 

    Once hreflang tags are placed in the page code, they are indexed and analyzed by bots that search for relevant results. They help search engines to understand the relationship between your pages and correspondingly provide localized search results.

    Hreflang tags alone are complicated for most of us out there. Imagine how complicated they can be when alternate links lead to broken pages.

    So, one of the most complicated and time-consuming hreflang mistakes to fix is tags linking to 4xx, 5xx pages, or redirects. While hreflang tells search engines there are alternative pages to index, bots can’t crawl these pages because they are invalid. As a result, such pages might not be indexed or appear in search results.

    Make sure you update your hreflang tags constantly.

    Incorrect Canonical Implementation

    Canonical and hreflang tags serve the same function – to provide a better experience for your website visitors and ensure right pages are displayed to them. However, there is still a difference.

    Canonical tags define the original page and restrict its alternatives from indexing. Hreflang tags work otherwise. They also define the original pages with x-default tags, but link to alternate pages bots should crawl.

    The most frequent issue is when canonical and hreflang tags are not combined correctly.

    Let’s take the same example as before: you have pages in English, German and French. All of them have return hreflangs to each other, but canonical tags link to the English page in all 3 cases. So, hreflang tells search bots to analyze all 3 alternative pages, but canonical says the main page is English.

    Confusing right?

    Imagine how confusing it is to search engines that have to pull out some results in SERP. They might display some of 3 pages eventually: English, French or German. But you’d better not take that chance and apply self-referential canonical tags correctly.

    Make sure the English page has a canonical to the English page, German – to German page, and French to French while keeping hreflang tags the same for all 3 of them.

    Canonical and Hreflang Tags

    No Absolute URLs

    Hreflang tags with errors in URLs are a common thing. And the link doesn’t necessarily have to be broken. Sometimes, it is enough to use relative URLs instead of absolute ones to create an issue.

    Where is the difference?

    Relative only provides a path, but absolute URL provides all necessary information to locate the resource.

    Google needs the full page URL path to know where to go and what to index. So, you have to verify the URLs you set in hreflang tags to avoid future issues with indexing and hreflangs interpretation.

    Relative Links in Href Tags

    Blocked Pages

    Search engines need guidance to know what page of your website to index since there definitely are some you don’t need to be crawled: e.g. customer login page, checkout, etc. You provide that roadmap for crawlers in robots.txt file or add meta robots no-index tag to some pages.

    If any of these no-indexed pages get into the hreflang tags, it can result in return tag issues since the search engine won't be able to follow return links from these pages.

    However, it doesn’t mean all your hreflang tags won’t work. Google just won’t crawl the blocked pages and return links from them. Double-check to add only indexed pages to the hreflang tags.

    Combining Different Tagging Methods

    As far as you know there are different methods to add hreflang tags as per Google recommendation. You can add hreflang tags to your website pages via sitemap or page <head>.

    None is proven to be more productive than the other. However, both require quite some time and effort, especially if you have a lot of pages to add hreflangs to.

    The point is you shouldn’t combine two tagging methods. Choose one that is more suitable for you and stick to it. It is redundant to use both of them.

    How to Fix Hreflang Tags with Errors in Magento 2?

    In the world of eCommerce, every detail counts. Even small issues such as wrong order of the language and country codes or missing dash can influence the visibility of a multi-language page. Not speaking about the indexing and crawling issues.

    Magento doesn’t provide you with the built-in hreflang tags functionality. So you still have to implement them manually. We’re all human and we can’t ignore the likelihood of making a mistake, especially with such a complex concept as hreflang tags.

    What we can do though is to prevent hreflang tags with errors by using the right tools to implement them.

    Magento 2 Hreflang Tags Extension allows you to set hreflang tags for your store pages directly from the admin panel. It enables any admin user to add them without any technical knowledge and allows to prevent the most common hreflang mistakes.

    Want to know how?

    Once you add the alternate hreflang tag to the original page, return tag to the original page automatically appears on the alternative one. This way you avoid no return tag issues. Moreover, the extension automatically adds self-referencing hreflang tags. So, you don’t have to worry about this mistake either. 

    Alternate Hreflang Tags in Magento 2

    Then, the Hreflang Tags extension uses only dashes and always places language code before the country one. And, obviously, it cannot add only country code without a language. The only thing is you have to double-check the language codes you use and set when creating a store view.

    You also have a choice, regarding the x-default tag. You can enable or disable it if you like.

    Magento 2 Hreflang Tags extension adds only absolute URLs in the hreflang tags. However, you should still verify if the page is indexed and doesn’t lead to any 4xx or 5xxp pages or redirects.

    Still unsure if it is what you are looking for?

    Try it out yourself on our live demo and see how easily it could be to implement hreflang tags in Magento 2 without errors.