Error Codes Wiki

HTTP 406 Not Acceptable — What It Means & How to Fix It

Error4xx client error

About HTTP 406 Not Acceptable

The HTTP 406 Not Acceptable status code indicates the server cannot produce a response matching the criteria specified in the request Accept headers. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: This occurs when content negotiation fails because the server cannot satisfy the Accept header requirements.. The client requested a content type or encoding the server does not support.. The server should list available representations in the response.. Common Accept headers include Accept, Accept-Language, Accept-Encoding, and Accept-Charset.. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: The Accept header requests a content type the server does not support.. Language negotiation via Accept-Language finds no matching content.. The client requires a specific encoding that the server cannot provide.. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Review the Accept headers in your request.. Check the API documentation for supported content types.. Try removing restrictive Accept headers to see the default response.. Add support for common content types on the server.. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our HTTP Status Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

What does HTTP 406 Not Acceptable mean?

It means the server cannot produce a response in any format acceptable to the client, as specified by the Accept headers in the request.

Overview

The HTTP 406 Not Acceptable status code indicates the server cannot produce a response matching the criteria specified in the request Accept headers.

Key Details

  • This occurs when content negotiation fails because the server cannot satisfy the Accept header requirements.
  • The client requested a content type or encoding the server does not support.
  • The server should list available representations in the response.
  • Common Accept headers include Accept, Accept-Language, Accept-Encoding, and Accept-Charset.

Common Causes

  • The Accept header requests a content type the server does not support.
  • Language negotiation via Accept-Language finds no matching content.
  • The client requires a specific encoding that the server cannot provide.

Steps

  1. 1Review the Accept headers in your request.
  2. 2Check the API documentation for supported content types.
  3. 3Try removing restrictive Accept headers to see the default response.
  4. 4Add support for common content types on the server.

Tags

httpclient-errornot-acceptablecontent-negotiation

Related Items

More in 4xx Client Error

Frequently Asked Questions

It means the server cannot produce a response in any format acceptable to the client, as specified by the Accept headers in the request.