
Element Code: IN-032
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.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
langattribute on the<html>element (plusxml:langon legacy XHTML setups). - The
Content-LanguageHTTP response header, or itsmeta http-equivtwin 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.
The four signals, side by side
| Signal | Where it lives | Who reads it | Typical failure |
|---|---|---|---|
lang attribute | <html lang="fr"> | Screen readers, browsers, Bing; Google mostly ignores it | Theme hardcodes en for all locales |
Content-Language | HTTP header or meta http-equiv | Bing and other consumers; optional signal | Server or CDN sends one global value for every locale |
| hreflang | Head links, XML sitemap, or HTTP header | Google and Yandex for version selection | Self reference missing or declaring a different language than the page |
| Visible content | The rendered text itself | Google's primary language detection input | Mixed language pages: translated body, untranslated nav and boilerplate |
How to detect conflicts
- 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 langattribute 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. - Check headers with curl. Run
curl -sI https://example.com/fr/page/and look forContent-Language. Do this per locale folder, because CDNs love to inject one global value. - 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. - 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.
- Declare one language per URL, identically in every signal
- Generate
langand hreflang from the same locale variable - Keep a valid hreflang self reference on every page
- Translate boilerplate, not just body copy
- Drop the
Content-Languageheader if you cannot maintain it per locale
- Hardcode
lang="en"in a template shared by all locales - Let a CDN inject one global
Content-Languagefor every market - Use invented codes like
en-UKorgb; it isen-gb - Point hreflang at redirected or noindexed URLs
- Assume Google ignoring
langmeans 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?
Is a conflict a penalty risk?
Should I remove the Content-Language header?
What about pages that genuinely mix languages?
Which codes are valid in hreflang?
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.An advanced audit maps every language signal on every template, finds the conflicts, and gives your developers an exact per locale fix list.
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.







