Accept-Language

The HTTP Accept-Language request header communicates which natural languages and regional variants a client prefers for response content.

Usage

The Accept-Language header is part of content negotiation. A client sends a ranked list of language tags, and the server selects the best available translation for the requested resource.

Browsers populate this header from their language preferences, which default to the operating system locale. The value follows BCP 47 language tag syntax, supporting primary language codes (en, de, fr) and regional subtags (en-US, pt-BR, zh-CN). Quality values rank the preferences when multiple languages are listed.

The server communicates the language of the returned content through the Content-Language response header. When no matching translation exists, most servers return the default language rather than responding with 406 Not Acceptable, since serving content in a fallback language is typically more useful than returning an error.

A response selected by Accept-Language carries Vary: Accept-Language so caches store one copy per language preference instead of serving the first visitor's language to everyone. The Vary entry also fragments CDN caches by the full header value, which is the reason many sites negotiate once, redirect to a language URL, and cache the language URLs without Accept-Language in the key.

Redirecting every request by Accept-Language is the common anti-pattern. A visitor who wants the German page but sends an English browser never reaches it, and a crawler sending no header lands on the default locale and indexes nothing else. Negotiating only on the root URL, keeping each language on its own URL, and linking the variants with Hreflang keeps every version reachable by link.

Directives

language-tag

A BCP 47 language tag. A primary subtag like en matches any regional variant. A tag with a region subtag like en-GB targets a specific locale.

* (wildcard)

A wildcard matching any language not already listed.

;q= (quality value)

A weight between 0 and 1 expressing relative preference. The default is 1.0. A value of 0 marks a language as not acceptable.

Example

A client preferring British English, with generic English as a fallback and German at reduced priority. The server responds with content in generic English.

Request

GET / HTTP/1.1
Host: www.example.re
Accept-Language: en-GB, en;q=0.9, de;q=0.5

Response

HTTP/1.1 200 OK
Content-Language: en

A request from a browser configured for French with a fallback to any language.

Accept-Language: fr-FR, fr;q=0.9, *;q=0.5

A multilingual preference list ordering Spanish first, Portuguese second, and English third.

Accept-Language: es, pt;q=0.8, en;q=0.6

Crawlers and Accept-Language

Google and Bing send no Accept-Language header. Google documents the omission for Googlebot and recommends separate URLs per locale with Hreflang annotations, and Bingbot requests arrive without the header as well. The main AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot) and YandexBot also send none. A page choosing its language from the header alone therefore shows these crawlers the default locale only, and a redirect keyed on the header strands them there. Baiduspider, SeznamBot, and DuckDuckBot send Accept-Language on every request, Meta-WebIndexer on most, and Applebot rarely. Serving every language on its own URL, linked through Hreflang, is the configuration all of them index correctly.

Verified crawler probe

Probe data from verified crawler traffic (November 2026 snapshot) shows which bots send Accept-Language when requesting pages. Yes marks the header on at least nine of ten sampled requests from the bot, Sometimes marks a smaller share, and No marks absence.

Crawler Sends Accept-Language
Amazonbot No
Applebot No
Baiduspider Yes
Bingbot No
ClaudeBot No
DuckDuckBot Yes
GPTBot No
Googlebot No
Googlebot (smartphone) No
Googlebot-Image No
Meta-ExternalAgent Sometimes
Meta-WebIndexer Yes
OAI-SearchBot No
PerplexityBot Sometimes
SeznamBot Yes
YandexBot No
YandexFavicons No

See also

Last updated: November 3, 2026