Skip to main content
All CollectionsSite AuditIssues
"Hreflang and HTML lang mismatch" error in Site Audit
"Hreflang and HTML lang mismatch" error in Site Audit

Learn more about the "Hreflang and HTML lang mismatch" issue in Ahrefs' Site Audit and how to fix it on your website.

Anna avatar
Written by Anna
Updated over 5 years ago

What triggers this issue?

This issue reports page URLs where language codes declared in the HTML language attribute and in the hreflang annotation for the URL do not match.

Why is it important?

Although Google might not be using the HTML lang attribute today, other search engines and programs, such as screen readers, do to understand the language of the page.

How to fix it?

Review the pages listed in this report.

The "HTML lang language" column shows the language code from <html lang="..."> tag. The "Hreflang links" column lists the language codes specified in the hreflang attribute and their associated URLs.

For the reported pages, you should change the language code in either the HTML lang tag or in the hreflang annotation to match them.

Please note that the language code must be in ISO 639-1 format. Otherwise, the code will not be valid.

Did this answer your question?