406 vs 415: Not Acceptable vs Unsupported Media Type

406 and 415 can look similar in logs, but they tell clients, crawlers, and API consumers different things.

AspectHTTP 406 — Not AcceptableHTTP 415 — Unsupported Media Type
DefinitionNot Acceptable describes how the server processed the request and what the client should do next.Unsupported Media Type describes how the server processed the request and what the client should do next.
Plain-language summaryHTTP 406 Not Acceptable indicates a client errors response outcome.The server refuses the request because the Content-Type of the body is in a format the endpoint does not support. The Accept-Post header in the response tells the client what content types are acceptable.
When to useHTTP 406 Not Acceptable indicates a client errors response outcome.Return 415 when the Content-Type header specifies a format the endpoint cannot handle. Include Accept-Post or Accept-Patch in the response listing the supported content types.
Client behaviorClient handles 406 according to client-errors semantics.Change the Content-Type header and re-serialize the body in the supported format before retrying.
Caching behaviorSee 406 caching spec.Not cached.
SEO / crawler impactSearch crawlers interpret 406 (client-errors) for indexation and link equity accordingly.Search crawlers interpret 415 (client-errors) for indexation and link equity accordingly.
API / backend impactAPI clients branching on 406 expect Not Acceptable semantics.API clients branching on 415 expect Unsupported Media Type semantics.
Safe to retry?Only after fixing the underlying causeOnly after fixing the underlying cause

Common real-world scenarios

When you see HTTP 406

406 appears in production when: Malformed request format; Authentication or authorization mismatch.

When you see HTTP 415

Common when clients send form-encoded data to endpoints expecting JSON, or send JSON to endpoints expecting XML. Also appears when API versioning changes the required content type.

Decision rule

Use 406 when the response should communicate not acceptable behavior; use 415 when unsupported media type is the accurate protocol signal.

A frequent mistake is swapping 406 and 415 for convenience; that causes client retry bugs, incorrect cache signals, and misleading monitoring data.

Use 406 when the correct protocol signal is Not Acceptable. Use 415 when the correct signal is Unsupported Media Type. Returning either code for the wrong reason breaks client expectations, cache behavior, and monitoring accuracy.

FAQ

What is the biggest difference between 406 and 415?

406 communicates Not Acceptable, while 415 communicates Unsupported Media Type. Choosing the right one keeps clients and intermediaries predictable.

Do 406 and 415 have SEO or caching impact?

Yes. Search engines and caches interpret status classes differently. Use each code according to its semantics to avoid accidental indexing, stale responses, or crawl inefficiency.

Can APIs safely return 406 instead of 415?

Only when it matches contract semantics. API clients often branch logic by exact code, so swapping them can break retries, auth handling, or user-facing errors.

Full guides

HTTP 406 Not Acceptable — full guide · HTTP 406 status reference · HTTP 415 Unsupported Media Type — full guide · All comparisons · HTTP 415 status reference

Related comparisons