406 Not Acceptable

Estimated reading: 2 minutes 1315 views

This response code warns that the server was unable to generate a response matching the requested format. This usually happens when a requested file cannot be read by the client application.

This error is rarely used due to it’s usage is unclear to end users what is needed to resolve the issue. Instead a server usually would ignore the rejected header and deliver a page to the end user, as this is a preferred action.

If this error appears and the actions needed to resolve this are unclear, please contact the appropriate server support.

The HyperText Transfer Protocol (HTTP) 406 Not Acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request’s proactive content negotiation headers, and that the server is unwilling to supply a default representation.

Proactive content negotiation headers include:

  • Accept
  • Accept-Encoding
  • Accept-Language

In practice, this error is very rarely used. Instead of responding using this error code, which would be cryptic for the end user and difficult to fix, servers ignore the relevant header and serve an actual page to the user. It is assumed that even if the user won’t be completely happy, they will prefer this to an error code.

If a server returns such an error status, the body of the message should contain the list of the available representations of the resources, allowing the user to choose among them.

Status

406 Not Acceptable

Specifications

Specification
Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
# status.406