Skip to content
4xx Client Error

406 Not Acceptable

The server cannot produce a response matching the `Accept` headers the client sent.

What causes it

  • A client asking for `Accept: application/xml` from a JSON-only API.
  • An over-strict `Accept-Language` or `Accept-Encoding` negotiation.
  • Mod_security rules on shared hosting frequently return 406 for requests they dislike.

How to fix it

  • Relax the `Accept` header to `*/*` to confirm negotiation is the cause.
  • Most APIs are better off ignoring `Accept` and returning their one format with a 200.

At a glance

Class
4xx Client Error
Reference
RFC 9110 §15.5.7
Standardised
Yes
Retry the request?
No — fix the request

Other 4xx client error codes

Back to the full HTTP status code reference