HTTP status codes
What each code means, what causes it, how to fix it — without the RFC prose.
2xx — Success
-
200OK The request succeeded and the response carries the result. -
201Created The request created a resource — the canonical answer to a successful POST. -
204No Content Success, and the response deliberately has no body. -
206Partial Content The server is returning only the byte range the client asked for via the Range header.
3xx — Redirection
-
301Moved Permanently The resource lives at a new URL forever; the Location header says where. -
302Found Temporary redirect: use the Location target for now, but keep asking the original URL in future. -
304Not Modified The client's cached copy is still valid — the server sends no body, saving bandwidth. -
307Temporary Redirect Like 302, but strict: the client must repeat the request to the new URL with the same method and body. -
308Permanent Redirect Permanent like 301, method-preserving like 307.
4xx — Client error
-
400Bad Request The server refuses to process the request because it is malformed — broken JSON, invalid parameters, bad headers, oversized cookies. -
401Unauthorized Authentication is missing or invalid — the server does not know who you are. -
403Forbidden The server knows who you are and the answer is no. -
404Not Found The server has nothing at this URL. -
405Method Not Allowed The URL exists, but not for this HTTP method — a POST to a GET-only endpoint, a DELETE where none is defined. -
408Request Timeout The client took too long to finish sending its request, so the server hung up. -
409Conflict The request is valid but collides with current server state — a duplicate unique value, a stale version in optimistic locking, concurrent edits. -
410Gone Deliberately deleted, permanently, and the server is telling you so — a stronger statement than 404. -
413Content Too Large The request body exceeds what the server accepts — the classic upload-size rejection. -
415Unsupported Media Type The server cannot handle the request body's format, as declared by its Content-Type. -
418I'm a teapot The server refuses to brew coffee because it is, permanently, a teapot. -
422Unprocessable Content The request is syntactically fine — valid JSON, correct content-type — but semantically wrong: validation failed. -
429Too Many Requests You are being rate limited. -
451Unavailable For Legal Reasons The server refuses to serve the content because a legal demand — court order, sanctions, DMCA, GDPR block — prohibits it.
5xx — Server error
-
500Internal Server Error Something broke inside the server — an unhandled exception, a crashed handler — and it has nothing more specific to say. -
501Not Implemented The server does not support the request method at all — it does not recognize the verb or cannot fulfil it for any resource. -
502Bad Gateway A proxy or load balancer got an invalid response (or none) from the upstream server behind it. -
503Service Unavailable The server is temporarily unable to serve — overloaded, in maintenance, or dependencies are down. -
504Gateway Timeout A proxy gave up waiting for the upstream server to respond. -
507Insufficient Storage The server cannot store what the request requires — out of disk or quota.