HTTP Status Codes

HTTP 406 Not Acceptable

406
LowWeb Server

Not Acceptable — the server cannot produce a response matching the request headers

What 406 Means

The 406 error on the HTTP Status Codes indicates not acceptable — the server cannot produce a response matching the request headers. This typically occurs due to unsupported media type requested in the accept header.

A 406 Not Acceptable response appears when the server understands the request but cannot generate a representation that satisfies the client's declared preferences. It is tied to content negotiation, where headers such as Accept or Accept-Language limit which response formats are considered valid. In practice, 406 is less common than related 4xx responses because many applications fall back to a default representation instead of rejecting the request.

Technical Background

A 406 response is about representation matching, not about whether the URL exists or whether the request body is valid. The server has enough information to process the request, but it cannot choose a response format that fits the negotiation rules supplied by the client.

That makes 406 different from 415 and 422. A 415 focuses on an unsupported request media type sent to the server, while a 422 points to content that was parsed successfully but still fails application rules. A 406 instead focuses on the response representation the client is willing to receive.

Common Causes

  • Unsupported media type requested in the Accept header
  • Unsupported language or charset preference in the request
  • Strict content negotiation rules with no acceptable fallback

Typical Scenarios

  • An API request asks for application/xml on an endpoint that only returns JSON
  • A client sends narrow language or charset preferences that the server cannot satisfy
  • A proxy or custom client sets strict Accept headers that exclude the server's default response format

What to Know

A 406 is usually limited to requests with unusually strict Accept, Accept-Language, or related negotiation headers. When only one client or integration sees the error, the difference is often in those request preferences rather than in overall site availability.

Frequently Asked Questions

Common questions about HTTP 406 error

It means the server understood the request but could not return a response in a format that matched the client's declared preferences.

No. A 415 concerns the format of the request sent to the server. A 406 concerns the format of the response the client is willing to accept.

Many applications ignore narrow negotiation preferences and return a default format anyway. A 406 usually appears only when content negotiation is enforced more strictly.

Related Error Codes