HTTP Status Codes
Every status code you are likely to meet, what it means and where to look next. Codes with a Guide link have a page of their own with the usual causes, the fixes and an example response.
Status codes
49 of 49
| Code | Name | Meaning | Guide |
|---|---|---|---|
| 100 | Continue | The server got the headers; the client can send the body. | |
| 101 | Switching Protocols | The connection switches protocol, usually to WebSocket. | |
| 103 | Early Hints | Preload hints sent ahead of the final response. | |
| 200 | OK | The request succeeded. | |
| 201 | Created | A resource was created; its URL is in the Location header. | |
| 202 | Accepted | Accepted for processing that has not finished yet. | |
| 204 | No Content | Success, with no body to return. | |
| 206 | Partial Content | Part of the resource, answering a Range request. | |
| 301 | Moved Permanently | The resource has a new permanent URL. | Guide to 301 Moved Permanently |
| 302 | Found | Temporary redirect; clients may turn a POST into a GET. | |
| 303 | See Other | Fetch the result from another URL, with GET. | |
| 304 | Not Modified | The cached copy is still valid; no body is sent. | Guide to 304 Not Modified |
| 307 | Temporary Redirect | Temporary redirect that keeps the method and body. | |
| 308 | Permanent Redirect | Permanent redirect that keeps the method and body. | |
| 400 | Bad Request | The server cannot parse or accept the request. | Guide to 400 Bad Request |
| 401 | Unauthorized | Credentials are missing or invalid. | Guide to 401 Unauthorized |
| 402 | Payment Required | Reserved; some APIs use it for billing limits. | |
| 403 | Forbidden | The server understood the request and refuses it. | Guide to 403 Forbidden |
| 404 | Not Found | Nothing at this URL, or the server will not say. | Guide to 404 Not Found |
| 405 | Method Not Allowed | The URL exists, but not for this HTTP method. | Guide to 405 Method Not Allowed |
| 406 | Not Acceptable | Nothing matches the Accept headers the client sent. | |
| 407 | Proxy Authentication Required | A proxy between client and server wants credentials. | |
| 408 | Request Timeout | The client took too long to send the request. | |
| 409 | Conflict | The request clashes with the current state of the resource. | Guide to 409 Conflict |
| 410 | Gone | Removed on purpose, with no forwarding address. | |
| 411 | Length Required | The server needs a Content-Length header. | |
| 412 | Precondition Failed | An If-Match or If-Unmodified-Since check failed. | |
| 413 | Content Too Large | The request body is over the server's size limit. | Guide to 413 Content Too Large |
| 414 | URI Too Long | The URL, usually its query string, is too long. | |
| 415 | Unsupported Media Type | The server does not accept the body's Content-Type. | |
| 416 | Range Not Satisfiable | The requested byte range is outside the file. | |
| 417 | Expectation Failed | The server cannot meet the Expect header. | |
| 418 | I'm a teapot | An April Fools' joke from RFC 2324, kept reserved since. | |
| 421 | Misdirected Request | The connection reached a server that cannot answer for this host. | |
| 422 | Unprocessable Content | Well-formed, but the data fails validation. | Guide to 422 Unprocessable Content |
| 425 | Too Early | The server will not process a request that might be replayed. | |
| 426 | Upgrade Required | Switch to the protocol named in the Upgrade header. | |
| 428 | Precondition Required | The server requires a conditional request, such as If-Match. | |
| 429 | Too Many Requests | Rate limit reached; wait before trying again. | Guide to 429 Too Many Requests |
| 431 | Request Header Fields Too Large | The headers, often the cookies, are too large. | |
| 451 | Unavailable For Legal Reasons | Blocked for legal reasons. | |
| 500 | Internal Server Error | An unexpected error on the server. | Guide to 500 Internal Server Error |
| 501 | Not Implemented | The server does not support this method at all. | |
| 502 | Bad Gateway | A proxy got an invalid response from the server behind it. | Guide to 502 Bad Gateway |
| 503 | Service Unavailable | The server is overloaded or down for maintenance. | Guide to 503 Service Unavailable |
| 504 | Gateway Timeout | A proxy gave up waiting for the server behind it. | Guide to 504 Gateway Timeout |
| 505 | HTTP Version Not Supported | The server refuses this version of HTTP. | |
| 507 | Insufficient Storage | The server cannot store what the request needs. | |
| 511 | Network Authentication Required | A captive portal wants you to log in first. |
The five classes
- 1xx Informational
- The request was received and is still being processed.
- 2xx Success
- The request was received, understood and accepted.
- 3xx Redirection
- The client has to do something more, usually follow a redirect.
- 4xx Client error
- Something in the request is wrong or not allowed right now; most need a change before a retry.
- 5xx Server error
- The server failed to handle a request that looks valid.
Commonly confused
- 401 or 403? Not logged in, or logged in but not allowed.
- 400 or 422? Can't parse it, or parsed and invalid.
- 502 or 504? A broken answer, or no answer in time.
- 429 or 503? Your quota, or the server's capacity.
- 301 or 308? Both permanent; only 308 keeps a POST a POST.
- 404 or 410? Not here, or removed for good.