HTTP 406 Not Acceptable — What It Means & How to Fix It
Error4xx client error
Overview
The HTTP 406 Not Acceptable status code indicates the server cannot produce a response matching the criteria specified in the request Accept headers.
Key Details
- This occurs when content negotiation fails because the server cannot satisfy the Accept header requirements.
- The client requested a content type or encoding the server does not support.
- The server should list available representations in the response.
- Common Accept headers include Accept, Accept-Language, Accept-Encoding, and Accept-Charset.
Common Causes
- The Accept header requests a content type the server does not support.
- Language negotiation via Accept-Language finds no matching content.
- The client requires a specific encoding that the server cannot provide.
Steps
- 1Review the Accept headers in your request.
- 2Check the API documentation for supported content types.
- 3Try removing restrictive Accept headers to see the default response.
- 4Add support for common content types on the server.
Tags
httpclient-errornot-acceptablecontent-negotiation
Related Items
More in 4xx Client Error
http-400-bad-requestHTTP 400 Bad Request — What It Means & How to Fix It
Errorhttp-401-unauthorizedHTTP 401 Unauthorized — What It Means & How to Fix It
Errorhttp-402-payment-requiredHTTP 402 Payment Required — What It Means & How to Fix It
Errorhttp-403-forbiddenHTTP 403 Forbidden — What It Means & How to Fix It
Errorhttp-404-not-foundHTTP 404 Not Found — What It Means & How to Fix It
Errorhttp-405-method-not-allowedHTTP 405 Method Not Allowed — What It Means & How to Fix It
ErrorFrequently Asked Questions
It means the server cannot produce a response in any format acceptable to the client, as specified by the Accept headers in the request.