Conflicting Language Declarations

No Comments
Conflicting language declarations

Element Code: IN-032

TL;DR: A page can declare its language in four different places: the lang attribute, the Content-Language HTTP header, hreflang annotations, and the visible text itself. When those signals disagree, search engines fall back to guessing, hreflang clusters can quietly stop working, and users get served the wrong language version. The fix is boring and absolute: one language per URL, declared identically everywhere.
Check type
Indexation
Applies to
Multilingual sites
Severity
Medium to high
Detection
Crawler + header check
Fix effort
Low, usually template level

What this issue is

A conflicting language declaration means the machine readable signals about a page's language do not agree with each other, or with the language a human actually reads on the page. A classic real world example: a French product page whose template still ships <html lang="en">, whose server sends Content-Language: en-US globally, and whose hreflang annotation says fr-FR. Three signals, two languages, one confused crawler.

There are four places a language claim can live, and any two of them can disagree:

  • The lang attribute on the <html> element (plus xml:lang on legacy XHTML setups).
  • The Content-Language HTTP response header, or its meta http-equiv twin in the head.
  • The hreflang annotations pointing at the page, whether in the head, the XML sitemap, or HTTP headers, including the required self referencing entry.
  • The visible content itself, which is the signal Google actually trusts most.

Why it matters

Google has been clear in its multilingual site documentation and via John Mueller that it determines page language primarily from the visible content and does not rely on the lang attribute. So why care about conflicts at all? Three reasons, and they bite in different places.

First, hreflang is fragile and conflicts make it worse. Hreflang only holds together when every page in the cluster confirms its own role: correct self reference, valid ISO 639-1 language codes, return links intact. When the declared hreflang language does not match what the page detectably is, engines can ignore the annotation for that pair. The symptom is the familiar one: the English page ranking in France, the German page showing for Dutch users, and everyone blaming the wrong thing.

Second, not every consumer is Google. Bing weighs explicit signals like Content-Language and meta tags more than Google does. Translation features in browsers use lang to decide when to offer translation. Screen readers use it to pick the pronunciation engine, so a wrong lang makes your site literally unintelligible to some assistive tech users. That last one is an accessibility failure independent of any ranking effect.

Third, mixed signals usually indicate a broken template pipeline. Every time I find a conflicting declaration on an audit, there is a deeper cause behind it: a translation plugin bolted onto a theme that hardcodes English, a CDN injecting a global header, or an auto translation layer that swaps body text but not attributes. The conflict is the smoke, the pipeline is the fire.

ALIGNED (good) Page: French content every signal says fr lang="fr" Content-Language: fr hreflang="fr-fr" Visible text: French CONFLICTING (bad) Page: French content signals disagree, engine guesses lang="en" Content-Language: en-US hreflang="fr-fr" Visible text: French

The four signals, side by side

SignalWhere it livesWho reads itTypical failure
lang attribute<html lang="fr">Screen readers, browsers, Bing; Google mostly ignores itTheme hardcodes en for all locales
Content-LanguageHTTP header or meta http-equivBing and other consumers; optional signalServer or CDN sends one global value for every locale
hreflangHead links, XML sitemap, or HTTP headerGoogle and Yandex for version selectionSelf reference missing or declaring a different language than the page
Visible contentThe rendered text itselfGoogle's primary language detection inputMixed language pages: translated body, untranslated nav and boilerplate

How to detect conflicts

  1. Crawl with Screaming Frog. The hreflang tab flags missing self references, non 200 hreflang URLs, and unlinked cluster members. Add a custom extraction for the html lang attribute so you can put lang, hreflang, and URL locale side by side in one export. Sitebulb's international report does a similar cross check and calls out language mismatches directly.
  2. Check headers with curl. Run curl -sI https://example.com/fr/page/ and look for Content-Language. Do this per locale folder, because CDNs love to inject one global value.
  3. Compare against detected language. Screaming Frog can run language detection on page text. Any row where detected language, lang, and hreflang do not all match is a conflict to fix.
  4. Spot check mixed content. Open the worst templates and read them. If the nav, footer, and cookie banner are English on a Japanese page, engines see a diluted language signal no attribute can fix.

How to fix it

Pick one language per URL and make every signal repeat it. Concretely: set lang dynamically from the locale in your CMS template, never hardcoded. Make the hreflang self reference match that value, using ISO 639-1 language codes with optional ISO 3166-1 Alpha 2 regions, like fr or fr-ca. For Content-Language, either configure the server to emit the correct per locale value or remove the header entirely, since it is optional and a wrong global header is worse than none. Then translate the boilerplate: navigation, footers, forms, cookie banners. Finally, re-crawl and confirm the conflict count is zero.

DO

  • Declare one language per URL, identically in every signal
  • Generate lang and hreflang from the same locale variable
  • Keep a valid hreflang self reference on every page
  • Translate boilerplate, not just body copy
  • Drop the Content-Language header if you cannot maintain it per locale
DON'T

  • Hardcode lang="en" in a template shared by all locales
  • Let a CDN inject one global Content-Language for every market
  • Use invented codes like en-UK or gb; it is en-gb
  • Point hreflang at redirected or noindexed URLs
  • Assume Google ignoring lang means nobody reads it

What good looks like

A crawl export where every URL shows the same value in the lang attribute, the hreflang self reference, the header if present, and the detected content language. Zero mixed language templates. Users landing on the version they searched in, and no more support tickets from Quebec asking why they got the English site.

FAQ

Does Google use the lang attribute at all?
Google's documentation on multilingual sites says it relies on visible content to determine language, and John Mueller has repeatedly said the lang attribute is not used for ranking. Keep it correct anyway: Bing, browsers, and screen readers all read it.
Is a conflict a penalty risk?
No. There is no penalty here. The cost is lost precision: hreflang pairs getting ignored, wrong versions ranking in the wrong markets, and accessibility failures. Damage without a manual action is still damage.
Should I remove the Content-Language header?
If you can emit the correct value per locale, keep it. If your infrastructure sends one global value for everything, remove it. The header is optional, and a wrong declaration is the only bad option of the three.
What about pages that genuinely mix languages?
Set the page level lang to the dominant language and mark inline foreign passages with their own lang attribute on the wrapping element. For SEO, avoid half translated templates entirely: one language per URL is the rule worth enforcing.
Which codes are valid in hreflang?
ISO 639-1 for language, optionally followed by ISO 3166-1 Alpha 2 for region, like de, de-at, or es-mx. Region alone is invalid, and the most common typo in the wild is en-uk instead of en-gb.
Running a multilingual site and not sure your hreflang setup holds together?

An advanced audit maps every language signal on every template, finds the conflicts, and gives your developers an exact per locale fix list.

Get an Advanced SEO Audit

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog