Skip to content
Skip to content
← All Status Codes
406
Client Error

406 Not Acceptable

The server cannot produce a response matching the client's Accept headers.

Description

406 Not Acceptable is returned when the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers (Accept, Accept-Encoding, Accept-Language).

The server may return a list of available representations in the response body so the client can choose an appropriate one.

Common Causes

  • Client requests XML but server only produces JSON
  • Accept-Language specifies an unsupported locale
  • Client requires a specific encoding that the server doesn't support
  • API versioning mismatches via Accept headers

How to Fix

  • Ensure your API documents supported content types clearly
  • Implement proper content negotiation for all response formats
  • Return a default format (e.g. JSON) if no match is found rather than 406
  • Use Vary header to indicate which request headers affect the response

Check your website's HTTP status code

Check now →

Related Status Codes