Language vs country targeting
Language and country are distinct signals: Accept-Language reflects a browser's language preference, while edge country reflects the connecting network's location. This page explains why conflating them produces poor targeting and where hreflang belongs.
Two different signals
Accept-Language is a request header sent by the browser, reflecting the user's configured language preferences. Edge country is computed from the connecting IP and reflects the network's location. They answer different questions: what language the visitor prefers versus where the network resolved.
Neither implies the other. A visitor in one country may prefer a different language, and a language preference says nothing about physical location.
Where hreflang fits and how to avoid conflation
hreflang annotates language and regional variants of a page for search engines; it is a search-targeting signal, not a runtime location or language detector. Use Accept-Language for language preference, edge country for coarse geography, and hreflang to tell search engines about your variants.
Conflating these — for example forcing a language from country, or treating Accept-Language as a location — produces poor experiences and misleading reports. Keep each signal in its lane.
- Accept-Language: browser language preference
- Edge country: coarse network-derived geography
- hreflang: search-targeting annotation for page variants
How it appears in analytics and logs
Accept-Language indicates a visitor's preferred language; edge country indicates where the connecting network resolved. They are independent, and one does not reliably imply the other.
Diagnostic use case
Target language using language signals and use country for coarse geography, without treating one as a substitute for the other.
What WebmasterID can help detect
WebmasterID keeps language preference and coarse country distinct, so you do not mistake a language signal for geography or vice versa.
Common mistakes
- Forcing a content language from the edge country code.
- Treating Accept-Language as a location signal.
- Conflating hreflang targeting with runtime geolocation.
Privacy and accuracy notes
Language preference and coarse country are both handled as low-detail signals. WebmasterID keeps country a coarse estimate and does not combine signals to identify individuals.
Related pages
- hreflang and country targeting
hreflang tells search engines which language and regional version of a page to show, based on the user's language and region preferences — it is not a geolocation mechanism. This page explains what hreflang does, how it differs from edge country, and the common mistakes operators make.
- CDN edge country vs user country: why they differ
Many stacks derive a visitor's country from a CDN or edge header. That header reflects the network path and the edge's best estimate — not a verified user location. This page explains how edge geo headers are produced, why edge country and user country can diverge, and how to present country data honestly.
- Privacy-first analytics
Language and country kept as distinct, coarse signals.
Sources and verification notes
- MDN — Accept-Language headerAccept-Language conveys language preference, not location.
- Google Search Central — localized versions and hreflanghreflang signals language/region for search, not geolocation.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.