{ }HttpStatus.com

406 Not Acceptable

The server cannot produce a response matching the Accept, Accept-Language, or Accept-Charset constraints the client sent.

Defined in RFC 9110 §15.5.7

What 406 means

406 Not Acceptable is a content-negotiation failure: the server cannot produce a response that satisfies the constraints the client stated in its Accept, Accept-Language, or Accept-Charset headers, and unlike most negotiation mismatches, it has no acceptable representation to fall back to. RFC 9110 treats this as a genuine end state rather than something the server should silently work around, though in practice most servers prefer to relax the negotiation rather than return a hard failure.

The typical trigger is an API that only serves JSON receiving a request with Accept: application/xml, or a strict server-driven negotiation layer rejecting any media type it wasn't explicitly configured to serve. Accept-Language mismatches are less common in APIs but appear in content platforms that only have translations for a subset of locales and choose to fail rather than serve a default language silently.

406 is genuinely rare in production because most APIs simply ignore an unsupported Accept header and return their default representation instead of enforcing strict negotiation, treating a mismatched Accept as advisory rather than mandatory. When a 406 does appear, it usually indicates a deliberately strict server or an intentionally versioned API using media-type negotiation such as Accept: application/vnd.example.v2+json, where an unrecognized version string is a meaningful, actionable error rather than a nuisance to be silently smoothed over.

Common causes

  • The Accept header requests a media type, such as XML, that the server does not produce.
  • Accept-Language requests a translation the server has not published.
  • Accept-Charset specifies an encoding the server cannot generate.
  • A versioned media-type Accept header, such as application/vnd.api.v2+json, names a version the server no longer serves.

How to fix a 406

If you are the client (browser user or API caller)

  • Send an Accept header matching a format the API documents as supported.
  • Remove an overly specific Accept header to receive the server's default representation.
  • Check API versioning documentation if using media-type based version negotiation.

If you run the server

  • Document supported media types and list them explicitly in the 406 response body.
  • Prefer falling back to a default representation over a hard 406 unless strict negotiation is a deliberate API contract.
  • Return 415 instead when the problem is the request's Content-Type rather than the desired response format, to keep the two negotiation failures distinct.

Example

GET /api/report HTTP/1.1
Host: api.example.com
Accept: application/xml

HTTP/1.1 406 Not Acceptable
Content-Type: application/json

{"error": "not_acceptable", "supported_types": ["application/json"]}
The API only produces JSON, so an Accept header requesting XML cannot be satisfied.

Try it live

Our free status responder returns a real HTTP 406 you can point tests, monitors or a browser at.

GET https://mcp.httpstatus.com/status/406

Related status codes

Tools for debugging this