406 Not Acceptable
The server cannot produce a response matching the client's Accept headers.
Definition (RFC 9110)
HTTP status code 406 406 Not Acceptable is defined in RFC 9110 (HTTP Semantics), Section 15.5.7 — the current authoritative specification for HTTP semantics, published June 2022, which obsoletes the older RFC 7231 and RFC 2616.
Description
406 Not Acceptable is returned when the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers (Accept, Accept-Encoding, Accept-Language).
The server may return a list of available representations in the response body so the client can choose an appropriate one.
Common Causes
- Client requests XML but server only produces JSON
Accept-Languagespecifies an unsupported locale- Client requires a specific encoding that the server doesn't support
- API versioning mismatches via Accept headers
How to Fix
- Ensure your API documents supported content types clearly
- Implement proper content negotiation for all response formats
- Return a default format (e.g. JSON) if no match is found rather than 406
- Use
Varyheader to indicate which request headers affect the response
Check your website's HTTP status code
Check now →