API with strict content negotiation
- Typical trigger
Accept: application/xmlon a JSON-only endpoint- Fix
- Send an
Acceptthe API supports, such asapplication/json, or*/*
A 406 means the server cannot match your Accept headers and refuses a default. Learn which headers cause it and how visitors, API clients and admins fix it.
A 406 Not Acceptable response means the server cannot offer a version of the resource that fits the request's content negotiation headers (Accept, Accept-Language, Accept-Encoding) and refuses to supply a default. Clients should send broader headers such as Accept: */*. Server owners should serve a default format instead of rejecting the request.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
The headers involved are Accept (media types), Accept-Language and Accept-Encoding. Cloudflare's docs give the example of a client asking for a language or character set the server doesn't support.
It is a request problem like a 400, but narrower: the request is valid, it just can't be satisfied in the format requested. A server that refuses the body type the client sent uses 415 instead, and a 405 is about the method.
Accept: application/xml on a JSON-only endpointAccept the API supports, such as application/json, or */*ForceLanguagePriority Fallback for language mismatchesAccept that excludes the real typeAccept-Language with no matching versionIf a server does return a 406, RFC 9110 says it should include content listing the available representation characteristics and resource identifiers so the user or client can choose one. MDN adds that there is no standard way to do this.
Apache's content-negotiation docs describe the last step of the algorithm: if no variant is acceptable to the browser, it returns a 406 status with a body listing the available variants, and sets the Vary header to indicate the dimensions of variance. This is a standard mod_negotiation behavior, so check it if your site uses MultiViews or type maps. For language mismatches, mod_negotiation has a documented way out: ForceLanguagePriority Fallback serves the first variant from LanguagePriority instead of returning a 406 when none matches the client's Accept-Language. The default is Prefer, which does not do that.
LanguagePriority en fr de
ForceLanguagePriority FallbackIf a page only fails in one browser, an extension or an unusual setting may be changing the request headers. A private window with extensions off rules that out.
Open DevTools or run curl -v and read the Accept, Accept-Language and Accept-Encoding lines the client really sent.
curl -H 'Accept: */*' https://example.com/resource. If that returns 200, your original header was too narrow for the server.
Request one of the media types the API lists. If you need a different format, the API may use a file extension or a query parameter instead.
Serve the default representation when nothing matches, and log 406s to find which headers real clients send.
curl -i -H 'Accept: application/rtf' https://example.com/docs/doc1
curl -i -H 'Accept: */*' https://example.com/docs/doc1A 406 on a public page means a server rule is refusing requests with certain headers. Google treats it like other 4xx codes except 429: content isn't used, and an indexed URL that starts returning it is removed from the index. If Search Console shows 406s, fetch the URL with a broad Accept header and check what your server or firewall does with other headers. See 4xx errors.
4 questions people ask next, answered from the sources on this page.
The server cannot produce a response that matches the Accept, Accept-Language or Accept-Encoding headers in the request, and it will not send a default. The client asked for something the server will not provide.
Send broader headers, for example Accept: */*, or request a format the server supports. If you run the server, return a default representation instead of a 406, and list the available formats.
It is classed as a client error, because the request headers don't match what the server offers. The server's refusal to fall back to a default is a design choice that owners can change.
A 406 is about what the client wants back (Accept headers). A 415 is about the format of the data the client sent. Both mean the formats do not match, in different directions.
Run the free audit, then approve the fixes. Every change can be undone.