CheatSheetHub / HTTP Status Codes

HTTP Status Codes Cheat Sheet

Every status code you'll actually run into, what it means in plain language, and the real cause behind it — not just the official spec wording.

2xx Success 3xx Redirection 4xx Client errors 5xx Server errors

2xx — Success

The request worked as intended.
200OK — the standard success response, with a body.
201Created — a new resource was created, typically after a POST.
202Accepted — the request was accepted for processing but isn't finished yet.
204No Content — success, but there's nothing to return in the body.
206Partial Content — returns only part of a resource, used for range requests like video streaming.

3xx — Redirection

Further action is needed to complete the request.
301Moved Permanently — the resource now lives at a new URL, update your links.
302Found — a temporary redirect; the original URL should still be used next time.
304Not Modified — the cached version is still valid, no need to re-download.
307Temporary Redirect — like 302, but guarantees the method (GET/POST) won't change.
308Permanent Redirect — like 301, but guarantees the method won't change.
303See Other — redirect the client to fetch the result with a GET request, common after a form POST.
[ ad space — 336×280 ]

4xx — Client errors

Something about the request itself is wrong.
400Bad Request — the server can't parse or validate the request.
401Unauthorized — no valid authentication credentials were provided.
403Forbidden — you're authenticated, but not allowed to access this.
404Not Found — the resource doesn't exist at this URL.
405Method Not Allowed — the HTTP method used isn't supported for this URL.
409Conflict — the request conflicts with the current state of the resource.
422Unprocessable Entity — well-formed request, but the data fails validation.
429Too Many Requests — you've hit a rate limit, slow down.
402Payment Required — reserved for future use; occasionally used by APIs for billing issues.
406Not Acceptable — the server can't produce a response matching the client's Accept headers.
408Request Timeout — the client took too long to send the request.
410Gone — the resource existed once but has been permanently removed.
413Payload Too Large — the request body exceeds the server's size limit.
415Unsupported Media Type — the request body's format isn't supported.
451Unavailable For Legal Reasons — access is blocked due to a legal demand.

5xx — Server errors

The server failed to fulfil a valid request.
500Internal Server Error — a generic, unhandled failure on the server.
502Bad Gateway — a proxy/gateway got an invalid response from an upstream server.
503Service Unavailable — the server is overloaded or down for maintenance.
504Gateway Timeout — a proxy/gateway didn't get a response in time from upstream.
501Not Implemented — the server doesn't support the functionality needed to fulfil the request.
505HTTP Version Not Supported — the server doesn't support the HTTP version used in the request.

Common questions

What's the difference between a 401 and a 403 status code?

401 Unauthorized means the request lacks valid authentication credentials — the server doesn't know who you are. 403 Forbidden means the server knows who you are but you don't have permission to access the resource.

Why am I seeing a 502 Bad Gateway error?

A 502 means a server acting as a gateway or proxy got an invalid response from an upstream server. It usually points to a crashed backend, a timeout, or a misconfigured reverse proxy, not an error in the client's request.

Is a 304 status code an error?

No. 304 Not Modified means the cached version of the resource is still valid, so the server tells the browser to use it instead of sending the content again. It's a normal, expected response used for caching.

Copied