HTTP 406 — Not Acceptable
HTTP 406
Not Acceptable
The server cannot produce a response in any of the formats the client said it would accept.
What 406 actually means
Content negotiation failed. The client sent `Accept`, `Accept-Language` or `Accept-Encoding` headers restricting what it will take, and the server has nothing matching. In real life this is far more often a misconfigured security module than genuine negotiation failure — mod_security and several hosting stacks return 406 when a request trips a rule, which sends people hunting for a content-type problem that does not exist.
Common causes
- An `Accept` header requesting a format the endpoint does not produce
- A mod_security or WAF rule rejecting the request and reporting it as 406
- An API strictly enforcing `Accept: application/json` against a client sending something else
- A missing or wrong `Accept-Encoding` negotiation on a server that only serves compressed content
If you're just trying to view the page
- Try a different browser — a plugin or a modified `Accept` header can trigger this
- Disable browser extensions that alter request headers, and any VPN or proxy that rewrites traffic
- If it happens on one shared host and not others, it is likely a server-side security rule rather than anything about your setup
If it's your site
- Check mod_security logs first; on shared hosting this is the cause more often than negotiation is
- Consider ignoring an unsatisfiable `Accept` and serving your default representation, which the specification permits
- If you do return 406, list the available media types in the body so the client can retry sensibly
Reference
- Status code
- 406
- Reason phrase
- Not Acceptable
- Category
- 4xx — Client Error
- Defined in
- RFC 9110 §15.5.7
Common questions
- What does HTTP 406 mean?
- The server cannot produce a response in any of the formats the client said it would accept. Content negotiation failed. The client sent `Accept`, `Accept-Language` or `Accept-Encoding` headers restricting what it will take, and the server has nothing matching.
- How do I fix a 406 error?
- Try a different browser — a plugin or a modified `Accept` header can trigger this
- Is 406 a client error or a server error?
- 406 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.
Related pages
- 404 Not Found The server is reachable and working, but there is nothing at the address you ask
- 403 Forbidden The server understood the request and is refusing to allow it, and logging in wi
- 401 Unauthorized You need to authenticate, and either you did not or your credentials were reject
- 429 Too Many Requests You have sent more requests than the service allows in a given period.
- 400 Bad Request The server could not understand the request because something about it is malfor
- 413 Content Too Large The request body is bigger than the server is willing to accept.
- 422 Unprocessable Content The request is well-formed and understood, but the data in it fails the rules.
- 405 Method Not Allowed The URL exists, but it does not accept the HTTP method you used.
- 409 Conflict The request cannot be completed because it clashes with the current state of the
- 415 Unsupported Media Type The server will not accept the format of the body you sent.
- 408 Request Timeout The server gave up waiting for the client to finish sending its request.
- 410 Gone The resource was deliberately removed and is not coming back, and there is no fo