Start from the code you were handed. Every page separates what the specification says from what you actually do about it, and answers the front end, the back end and the person who just wanted the page to load as three different questions.
| Code | Name | Class | What it means |
|---|---|---|---|
| 301 | Moved Permanently | 3xx | The old URL is retired and the one in `Location` replaces it — and because a 301 is one of the few responses a cache may store without being told to, a 301 sent by mistake is the hardest redirect to take back. |
| 302 | Found | 3xx | A temporary detour: the resource still belongs at the URL you asked for, but for now the server wants this request served from somewhere else — and your browser will take the detour without ever showing it to your code. |
| 304 | Not Modified | 3xx | Your copy is still good: you sent a validator with the request, the server compared it against the one it holds, they matched, and it deliberately sent headers and no body. |
| 400 | Bad Request | 4xx | The server refused to interpret the request at all — something in the request line, a header, the framing or the body is malformed or oversized — which usually means none of your application code ever ran. |
| 401 | Unauthorized | 4xx | The request carried no usable authentication credentials — the reason phrase says Unauthorized, but the condition it describes is unauthenticated, and the header naming what would work is mandatory. |
| 403 | Forbidden | 4xx | The server understood the request perfectly well and is refusing to carry it out — and unlike a 401, it owes you no header explaining what would have worked. |
| 404 | Not Found | 4xx | The server understood the request and has nothing to serve at that path — which on a modern stack is far more often a routing or deployment mistake than a dead link. |
| 405 | Method Not Allowed | 4xx | The path exists and the server recognises the verb — it just does not accept that verb here, and it is required to hand you the list of verbs it does accept. |
| 429 | Too Many Requests | 4xx | A rate limiter has decided you are asking too often — a policy statement rather than a protocol one, which is why two services answering 429 may be counting entirely different things. |
| 500 | Internal Server Error | 5xx | The application itself ran, hit something it did not expect, and gave up — so unlike a 502 or a 504 there is a stack trace somewhere, and the whole job is finding which log holds it. |
| 502 | Bad Gateway | 5xx | A proxy in front of the application answered on its behalf, because the application's own answer was missing, truncated or not valid HTTP. |
| 503 | Service Unavailable | 5xx | Something decided not to serve you, on purpose and for now — a maintenance page, a rate limiter or a load balancer with nothing healthy to send you to — which makes 503 the only 5xx that comes with an expiry date. |
| 504 | Gateway Timeout | 5xx | A proxy waited for an upstream, ran out of patience and answered on its behalf — so the number that identifies the culprit is not the status code but the elapsed time, which is always somebody's configured timeout. |
| 521 | Web Server Is DownNon-standard | 5xx | Cloudflare's own code, not an IETF one, for the narrowest failure in the whole 5xx range: your origin actively refused Cloudflare's TCP connection, so nothing was slow and nothing was misrouted — something said no. |
| 524 | A Timeout OccurredNon-standard | 5xx | Cloudflare's own code for a request that got all the way in and then went quiet: the connection succeeded, the origin received it, and 125 seconds later there was still no HTTP response to send back. |