hreflang and html lang disagree about the page's language

In the reportHreflang self-reference contradicts html lang

hreflang_html_lang_mismatch · Review item

Short answer

This appears when the hreflang entry a page gives itself names one language and its <html lang> names another, such as hreflang="fr" on a page marked lang="en". Review which language each declaration should describe, and correct any unintended difference.

Severity: Low. Review it when convenient: it is usually one template setting, and Google does not use either tag to detect a page's language.

Why it matters

The W3C advises always declaring the default language of a page's text with lang on the <html> element. hreflang tells search engines which address serves which language, so a difference between the page's own entry and its lang needs review.

What to do

  1. Look at the finding: it shows the page's <html lang>, its own hreflang entries and the base language of each.
  2. Check which language the page is written in.
  3. Correct the lang attribute or the hreflang entry, usually in the template that sets it.

When to leave it as it is: if the page mixes languages on purpose and both declarations are deliberate, you can leave it.

What we read

We read the page's hreflang in two places, the <link rel="alternate" hreflang> tags in its HTML and an hreflang Link header in its response; the sitemap is not read for this check. We compare the page's <html lang> with the entries that point to the page itself.

Only the base language is compared: de-AT and de agree, fr and en do not. A page is marked as not checked when any of its hreflang values is not a valid language code, such as en_US, or its <html> tag is not within the first 65,536 decoded characters. A page is marked as not checked when either could not be read in full, for example HTML with unsupported SVG markup, <noscript> or <select> element anywhere, or a Link header with a relation we cannot parse; an annotation with an empty, relative or non-web address blocks the page too.

Example & evidence

Illustrative example — one page, not a live audit.

https://bakery.example/fr/ has:

<html lang="en">
<head>
<link rel="alternate" hreflang="fr" href="https://bakery.example/fr/">

The page's own hreflang entry says French and its lang says English, so the page is reported.

<html lang="fr">

A possible correction, if the page is in French: set lang to match.

Confirm & check again

Check for yourself: view the page source and compare lang on the <html> tag with the hreflang tag whose href is the page's own address.

Check again: Full audit — run a new audit of the site. The finding closes when the page is crawled again and the two agree on the base language, or one of them is removed. A page that cannot be read keeps the finding open.

Limits & sources

The check compares two declarations; it does not detect the language the page is written in, and Google says it does not use either to detect a page's language. Related codes such as no and nb count as different, and xml:lang and Content-Language are not read.

Confidence: High because both declarations are read directly.

Sources

Editorial review: 29 September 2026