Cette page n’est pas encore traduite en français : elle s’affiche en anglais.

HTTP 406 Not Acceptable

The server cannot produce a response matching the client’s Accept headers.

Mis à jour le

406
Not Acceptable
4xx Client error
Class
RFC 9110 §15.5.7
Defined in

What does HTTP 406 mean?

The server cannot produce a response matching the client’s Accept headers. Content negotiation failed: the client asked for, say, application/xml only, and the server can only produce JSON. Some security modules (mod_security) also misuse 406 to block requests.

4xx Client error: The request has a problem the client can fix: wrong URL, missing credentials, bad data or too many requests.

Common causes of a 406 error

  • Strict Accept header from an API client.
  • A web application firewall rule.

How to fix 406 Not Acceptable

  • Send Accept: */* or a supported type.
  • Check WAF logs if browsers get 406.

406 and SEO

Rare for web pages; if Googlebot receives 406 the page is not indexed.

Example response

HTTP/1.1 406 Not Acceptable

How to return a 406 response

Node.js (Express)

res.status(406).json({ error: 'Not Acceptable' });

PHP

http_response_code(406);

Python (Flask)

return {'error': 'Not Acceptable'}, 406

Go (net/http)

w.WriteHeader(406)

nginx

return 406;

Related status codes

Check which status code a URL returns with the HTTP header checker.

All HTTP status codesSearch the full list of status codes from 100 to 599 with their meanings and SEO impact.
Open the full list

Questions fréquentes

What does status code 406 mean?
406 Not Acceptable: The server cannot produce a response matching the client’s Accept headers.
How do I fix a 406 error?
Send Accept: */* or a supported type. Check WAF logs if browsers get 406.
Does 406 affect SEO?
Rare for web pages; if Googlebot receives 406 the page is not indexed.