This site uses cookies and other tracking technologies to make possible your usage of the website, assist with navigation and your ability to provide feedback, analyse your use of our products and services, assist with our promotional and marketing efforts, and provide better user experience.

By using the website, you agree to our Privacy policy

Accept and continue

Report a bug

Cancel
85
How-to 6 min read September 26, 2019

Errors in hreflang attributes: what are they and how to fix them

Problems with hreflang are mainly caused by typos, the use of incorrect codes and non-existent links. If there are errors, the crawler ignores this attribute.

Common hreflang attribute errors

1
Invalid format. The language code is indicated first, and then the region code is specified. To determine the code, you need to use the language ISO 639-1 and the regional ISO 3166-1 Alpha 2 standards. Before implementing an attribute, it is important to verify that the link format complies with the specified standards.

For example, you need to create a page for English-speaking citizens living in the United States. Using the "en-us" format is correct. For English-speaking citizens from the UK, the correct sequence is "en-gb," but not "en-uk." According to the rules of setting the attribute, the language must be specified, and the region may be completely absent.

In some links, only the region is found, and this is wrong. It is allowed to use the only language so that the page is displayed to people who speak a specific language, but are located anywhere in the world.
2
Separation of language and region using dashes or underscores. The only correct option is to use a hyphen. For example, "en-us" is correct, and "fr_uk" is incorrect.
3
Conflicts in the attribute code. Setting up hreflang involves using a single page for one language. In other words, one language version corresponds to a single URL in the code. Multiple pages cannot be written in one language.

In the example, the English version is used for all pages. This is an error:
Conflicts in hreflang attribute code
4
Typos. For example, instead of "fr" which stands for France, "fi" is used which means Finland. However, the page content is written in French. This page will not be indexed by the search engine. To avoid such errors, use the hreflang tag generator.
5
Hreflang attributes with errors in links:

  • links direct to pages that do not exist. When clicking on the URL, an error 4xx or 5xx is shown;
  • lacking a specific hreflang element. If a language version exists, but no attribute has been created for it;
  • the ones redirect to another page. In this case, the second URL is not indexed;
  • without full indication of their components. We are talking about the so-called relative links with the missing first part.
Incorrect: /catalog1/file1.html
Correct: http://site.com/catalog1/file1.html
6
Lack of backlinks. Problems with hreflang occur in the absence of return confirmative links to the attribute. If page 1 refers to page 2, then page 2 must have a backlink to page 1.
Any of these errors on a specific page leads to the fact that it will not be indexed by a search engine robot.

How to find and fix hreflang errors

You will have to revise the hreflang attribute code yourself to detect errors in writing letters and hyphens and check the correspondence of languages and regions. Use the Screaming Frog service to determine the mismatch of one language version to a single page:
Validating the hreflang attribute in Screaming Frog
The absence of backward supporting links is also checked manually. Non-existent URLs and redirects are easily detected using an online tool, for example, the Site Audit module in Serpstat.

What you need to do to prevent errors:

1
Use absolute links instead of relative ones.
2
Each time you add the hreflang attribute, check the data for compliance with the standards.
3
Delete URLs displaying 4xx or 5xx error codes and redirect pages.
4
Determine what is more important for the website: user language or region. In the first case, do not use the location indication, and specify the language and country in the second one.

Conclusion

The problems with the hreflang attribute are mainly caused by:

  • errors in specifying languages and regions according to the standards;
  • using nonexistent links and redirects;
  • lack of backlinks to pages with the attribute;
  • the order of specifying the component links with the hreflang attribute;
  • specifying multiple pages for one language version.

To find the hreflang attributes with errors and fix them, you need to conduct a small audit of the pages and adjust everything that does not comply with the rules for setting up sites with several language versions.
This article is a part of Serpstat's "Site Audit" tool
SEO Audit in Serpstat
Audit all the site or page in one click. A complete list of errors, sorted by severity, ways to resolve them and recommendations. Any frequency of verification and automatic email reports.
Run Site Audit

Learn how to get the most out of Serpstat

Want to get a personal demo, trial period or bunch of successful use cases?

Send a request and our expert will contact you ;)

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Share this article with your friends

Sign In Free Sign Up

You’ve reached your query limit.

Or email
Forgot password?
Or email
Back To Login

Don’t worry! Just fill in your email and we’ll send over your password.

Are you sure?

Awesome!

To complete your registration you need to enter your phone number

Back

We sent confirmation code to your phone number

Your phone Resend code Queries left

Something went wrong.

Contact our support team
Or confirm the registration using the Telegram bot Follow this link
Please pick the project to work on

Personal demonstration

Serpstat is all about saving time, and we want to save yours! One of our specialists will contact you and discuss options going forward.

These may include a personal demonstration, a trial period, comprehensive training articles & webinar recordings, and custom advice from a Serpstat specialist. It is our goal to make you feel comfortable while using Serpstat.

Name

Email

Phone

We are glad of your comment
Upgrade your plan

Upgrade your plan

Export is not available for your account. Please upgrade to Lite or higher to get access to the tool. Learn more

Sign Up Free

Спасибо, мы с вами свяжемся в ближайшее время

Invite
View Editing

E-mail
Message
Optional
E-mail
Message
Optional

You have run out of limits

You have reached the limit for the number of created projects. You cannot create new projects unless you increase the limits or delete existing projects.

I want more limits