// http
HTTP Status Codes Cheatsheet
Every status code you'll see in real traffic — grouped by class, with the operational meaning instead of just the spec definition.
Updated
Status code reference
1xx informational • 2xx success • 3xx redirect • 4xx client error • 5xx server error
| Code | Name | Meaning |
|---|---|---|
| 100 | Continue | Client should continue the request body. |
| 101 | Switching Protocols | Server is switching protocols (e.g. WebSocket upgrade). |
| 103 | Early Hints | Preload hints sent before the final response. |
| 200 | OK | Standard success. |
| 201 | Created | Resource was created. |
| 202 | Accepted | Request accepted, processing async. |
| 204 | No Content | Success, no body. Common for DELETE/PUT. |
| 206 | Partial Content | Range request succeeded. |
| 301 | Moved Permanently | Permanent redirect. Cached aggressively. |
| 302 | Found | Temporary redirect (legacy semantics). |
| 304 | Not Modified | Cache is still valid. No body returned. |
| 307 | Temporary Redirect | Like 302 but preserves method. |
| 308 | Permanent Redirect | Like 301 but preserves method. |
| 400 | Bad Request | Malformed request — client error. |
| 401 | Unauthorized | Authentication required or failed. |
| 403 | Forbidden | Authenticated but not allowed. |
| 404 | Not Found | Resource doesn't exist. |
| 405 | Method Not Allowed | Method not supported on this resource. |
| 408 | Request Timeout | Client took too long. |
| 409 | Conflict | Request conflicts with current state. |
| 410 | Gone | Resource permanently removed. |
| 413 | Payload Too Large | Body exceeds server limit. |
| 415 | Unsupported Media Type | Content-Type not accepted. |
| 418 | I'm a Teapot | RFC 2324 joke. Sometimes used for 'blocked' responses. |
| 422 | Unprocessable Entity | Validation error — common in JSON APIs. |
| 429 | Too Many Requests | Rate limited. Check Retry-After header. |
| 500 | Internal Server Error | Generic server failure. |
| 501 | Not Implemented | Server doesn't support the method. |
| 502 | Bad Gateway | Upstream returned an invalid response. |
| 503 | Service Unavailable | Server overloaded or in maintenance. |
| 504 | Gateway Timeout | Upstream didn't respond in time. |
| 507 | Insufficient Storage | Server out of disk. |
| 511 | Network Authentication Required | Captive portal — log in to network first. |
FAQ
- What's the difference between 401 and 403?
- 401 means you haven't authenticated (or your token is invalid). 403 means the server knows who you are but you're not allowed to do that action.
- When should I use 301 vs 302?
- 301 (and 308) for permanent moves — search engines update their index. 302 (and 307) for temporary redirects, A/B tests, or maintenance pages.
- What does 502 Bad Gateway actually mean?
- Your reverse proxy (nginx, Cloudflare, ALB) reached the upstream server but got an invalid or no response. Check the upstream service health and timeouts.
- Why do I see 499?
- 499 is an nginx-specific code meaning the client closed the connection before the server could respond. Common when users navigate away or with aggressive client timeouts.