At One Place

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

  1. Try a different browser — a plugin or a modified `Accept` header can trigger this
  2. Disable browser extensions that alter request headers, and any VPN or proxy that rewrites traffic
  3. 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

  1. Check mod_security logs first; on shared hosting this is the cause more often than negotiation is
  2. Consider ignoring an unsatisfiable `Accept` and serving your default representation, which the specification permits
  3. 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

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked