406 Not Acceptable

The HTTP 406 status code means a server can’t return the requested version of the resource.

Clients can ask servers to serve a particular version of the resource (for example, HTML document, image file, JSON object).

For example, imagine a user has a Spanish locale set as the default (es-ES). A browser can (and will) ask a server to provide a Spanish version of the website, if possible, but otherwise fall back to an English version.

Accept-Language: es-ES, es;q=1, en;q=0.5

This process is called content negotiation. Apart from language, clients can negotiate:

HTTP spec states that browsers can respond with 406 Not Acceptable when the server is unwilling to supply a default representation; however, in reality, most servers do fall back to the default representation.