HTTP Status Codes: The Complete Reference for 104 Response Codes
A status code is the first thing a client reads after a request, and often the only thing it acts on. The response body may explain, apologise, or lie, but the three-digit number decides whether a browser caches the answer, a crawler keeps the URL, or a retry loop starts. This reference covers 104 codes: the 64 registered with IANA plus 40 platform codes that appear in nginx, Cloudflare, AWS, and IIS traffic. Each entry carries the class, the RFC section, cacheability, applicable methods, and the situation the code was designed for.
What the three digits tell you
The first digit names the class, and the remaining two narrow the reason inside that class. A client that meets an unfamiliar code falls back to the class, which is why 4xx and 5xx handling can be written once and still behave sensibly for codes that did not exist when the client shipped.
The registry itself lives with IANA and cites RFC 9110, Section 16.2.1, for the class definitions. Registration is not the same as adoption: some registered codes are marked unused, and some codes in daily use were never registered at all. Vendor numbers such as nginx 499 or Cloudflare 524 exist only in the documentation of the platform that produces them. A useful reference keeps both sets side by side, because a log line does not tell you where the number came from.
The five classes at a glance
| Class | Range | Meaning | Typical example |
|---|---|---|---|
| Informational | 1xx | Request received, processing continues | 100 Continue, 103 Early Hints |
| Success | 2xx | Request accepted and fulfilled | 200 OK, 201 Created |
| Redirection | 3xx | Further action needed to complete the request | 301 Moved Permanently |
| Client error | 4xx | The request cannot be fulfilled as sent | 404 Not Found, 429 Too Many Requests |
| Server error | 5xx | The server failed on a valid request | 500 Internal Server Error, 503 Service Unavailable |
The class is a contract about who should act. A 4xx says the client has to change something before retrying, apart from 408 and 429, where the server invites a retry after a delay. A 5xx says the request was acceptable and the server or an upstream component failed, so a retry with backoff is reasonable.
Codes you look up most
| Code | Name | Return it when |
|---|---|---|
| 200 | OK | The request succeeded and a representation is in the body |
| 201 | Created | A new resource exists, with its location in the Location header |
| 204 | No Content | The action succeeded and no body should be sent |
| 301 | Moved Permanently | The resource has a new permanent URL |
| 304 | Not Modified | A conditional GET found the cached copy still valid |
| 400 | Bad Request | The request is malformed or fails basic syntax checks |
| 401 | Unauthorized | Credentials are missing or invalid, and a challenge is required |
| 403 | Forbidden | The identity is known and the action is not permitted |
| 404 | Not Found | No resource maps to the request target |
| 409 | Conflict | The request clashes with the current state of the resource |
| 422 | Unprocessable Content | The body parses but fails validation rules |
| 429 | Too Many Requests | A rate limit was exceeded, with Retry-After if possible |
| 500 | Internal Server Error | An unexpected condition stopped the handler |
| 502 | Bad Gateway | An upstream returned an invalid response |
| 503 | Service Unavailable | The server is overloaded or under maintenance |
| 504 | Gateway Timeout | An upstream did not answer within the gateway budget |
Those sixteen cover most production incidents. The other eighty-eight exist for narrower reasons, and the detail panel of each one names the case it was registered for.
Redirects that need the right number
A permanent move returns 301, and search engines consolidate the old URL into the new one. A temporary move returns 302 or 307, and the old URL keeps its place. The difference between 302 and 307 is method preservation: with 302, a user agent may turn a POST into a GET on the second request, while 307 requires the same method and the same body. The pair repeats for permanent redirects, where 301 may rewrite the method and 308 must not.
That distinction matters for form submissions and API clients. A payment form behind a 301 can silently arrive at the new address as a GET without its body, which is why a permanent move of a POST endpoint belongs on 308. The older codes also predate the rule, so their behaviour in the wild depends on the client, and the reference lists methods for each entry so the choice is visible before the incident.
Error codes that mean different things
401 and 403 look interchangeable and are not. A 401 says the request lacks valid credentials, and the response must carry a WWW-Authenticate header naming the scheme. A 403 says the server knows who is asking and refuses anyway. Sending a 403 to an expired token sends the client looking for a permission that will never appear, and sending a 401 for a permission problem triggers a pointless login loop.
400 and 422 split syntax from semantics. Use 400 when the body does not parse, the content type is wrong, or a required header is missing. Use 422 when the JSON is valid but a business rule fails, such as a delivery date before the order date. Many public APIs collapse both into 400, so a client library should read the error body rather than infer too much from the number.
502, 503, and 504 all point at the server side and differ in what failed. A 502 means a gateway received something unusable from an upstream, which is often a crashed application behind the proxy. A 503 means the server is deliberately not serving, usually through overload or maintenance, and may include Retry-After. A 504 means the gateway gave up waiting, so the upstream may still be working on a request whose result nobody will read.
Status codes in API design
A create endpoint returns 201 with a Location header, not 200 with a copy of the object. An asynchronous job returns 202, because the work has been accepted and not completed. A delete that removes the representation returns 204 with no body, and a PUT that changes nothing visible may also use 204. A conflict between the request and the stored state returns 409, which is the honest answer for a duplicate email or a stale version number.
Rate limiting belongs in 429 with Retry-After, and a method that the resource does not allow returns 405 with an Allow header listing what it does allow. Returning 200 for a failure, or 500 for a validation error, moves the problem into the client, where logs are thinner and the request is already gone.
Caching and conditional requests
Twelve of the codes here are cacheable by default: 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501. A cache may store a 404 on purpose, which is useful for a missing asset that is requested on every page load, and it may store a 301 so the redirect does not hit the origin again.
Conditional requests use 304 to skip the body. The client sends If-None-Match with the stored ETag or If-Modified-Since with the last date, and the server answers 304 with the validators and no content. A 304 must not include a body, and neither must a 204. Writing a body into either response confuses proxies that treat the empty body as part of the contract.
What search engines do with the number
Crawlers act on the number, not on the page text. A 301 passes the signals of the old URL to the new one, a 302 or 307 keeps the old URL indexed, and a 404 or 410 removes it. Google treats 404 and 410 the same way for indexing, so 410 mainly communicates intent to the client and to the tools that read logs.
A missing page that returns 200 with friendly content is a soft 404. Users see an error page and crawlers see a working URL, which keeps the address in the index and wastes crawl budget. The reverse mistake is quieter: a page that returns 404 for a while during a deploy loses its ranking, then has to earn it back. A maintenance window belongs on 503 with Retry-After, not on 404.
Vendor codes in logs
Platform numbers explain gaps in the registered list. nginx 499 means the client closed the connection before the response was sent, which usually points at an upstream that is too slow. nginx 444 closes the connection without a response, a pattern used to drop abusive traffic. Cloudflare uses 520 through 527 and 530 for origin failures, including 521 for a down origin, 522 for a connection timeout, 524 for a timeout after the connection was made, 525 for a failed TLS handshake, and 526 for an invalid certificate.
AWS load balancers add 460 for a client that closed the connection, 463 for an oversized X-Forwarded-For header, and 464 for incompatible protocol versions. Microsoft IIS has 440 for a login timeout and 449 for a retry with different credentials. None of these appear in the IANA registry, and all of them can arrive at a client that has never heard of them, which is why the reference tags each entry with its vendor.
Using the catalog without slowing down
The tool is a browser reference, not a status checker. It never sends a request of its own, so it cannot test a live URL, and it does not pretend to. What it does is make a lookup fast: search by number, name, or keyword, then narrow by class, source, vendor, or the HTTP methods a code applies to. The catalog opens with one row of three cards and expands through Show all, which keeps the first screen short.
Three features carry most of the work. The detail panel answers what the code means, when to return it, its RFC section, whether caches may store it, and which methods it applies to. The Which code tab asks the situation instead of the number, with five starting answers that end on a concrete code. The Compare tab puts two codes side by side, which is the quickest way to settle 301 against 302 or 401 against 403 before a code review.
When the answer has to leave the browser, the Export menu writes the full set as CSV, JSON, or a typed TypeScript module. That is the same data the catalog renders, so a test fixture and the reference cannot drift apart.
Frequently Asked Questions
How many HTTP status codes are there?
The IANA registry lists 64 codes. Production traffic adds vendor numbers from nginx, Cloudflare, AWS, IIS, and ten other platforms, so this reference covers 104 in total.
What is the difference between 404 and 410?
A 404 says the resource is not found and may come back. A 410 says it is gone for good and there is no forwarding address. Search engines drop both from the index at a similar rate.
Can a successful response use a code other than 200?
Yes. 201 marks a created resource, 202 an accepted asynchronous job, 204 a success with no body, and 206 a partial response to a range request. A bare 200 is correct only when a representation is in the body.
Which code should a rate limiter return?
429 Too Many Requests, ideally with Retry-After telling the client how long to wait. Returning 503 for a rate limit hides the cause, and returning 403 tells the client that waiting will not help.
Should a DELETE return 204 or 200?
Return 204 when the resource is deleted and nothing useful remains to send. Return 200 only when the body carries information the client needs, such as a count of remaining items.
Do 1xx codes appear in normal traffic?
Rarely. 100 Continue shows up with large uploads, 103 Early Hints is used by some CDNs to preload assets, and 101 Switching Protocols marks a successful upgrade to WebSocket. Most clients never log them.
Virginia, United States · SO reputation 2000 · Badges: 0🥇14🥈17🥉 · SO member since 2013