HTTP Status Codes
Every HTTP response includes a three-digit status code grouped into five classes.
2xx — Success
| Code | Name | Notes |
|---|---|---|
| 200 | OK | Standard success. |
| 201 | Created | Location header should contain the new URI. |
| 204 | No Content | Common for DELETE and preflight CORS. |
| 206 | Partial Content | Range requests for video/download resumption. |
3xx — Redirection
| Code | Name | Notes |
|---|---|---|
| 301 | Moved Permanently | Browsers cache aggressively. |
| 302 | Found | Most implementations change POST to GET. |
| 304 | Not Modified | Cached version still valid. |
| 307 | Temporary Redirect | Preserves HTTP method. |
4xx — Client Error
| Code | Name | Notes |
|---|---|---|
| 400 | Bad Request | Catch-all for malformed requests. |
| 401 | Unauthorized | Include WWW-Authenticate. |
| 403 | Forbidden | Authenticated but not authorized. |
| 404 | Not Found | The most famous status code. |
| 418 | I'm a Teapot | RFC 2324. Will never be reassigned. |
| 429 | Too Many Requests | Include Retry-After. |
5xx — Server Error
| Code | Name | Notes |
|---|---|---|
| 500 | Internal Server Error | Never expose stack traces. |
| 502 | Bad Gateway | Invalid upstream response. |
| 503 | Service Unavailable | Use Retry-After. |
| 504 | Gateway Timeout | Upstream didn't respond in time. |