HTTP Status Codes: Meanings, Causes and Fixes
A status code is the server’s three-digit answer to every HTTP request; the first digit gives the class. Open any code for details, common causes and how to fix it.
1xx Informational
The request was received and processing continues.
- 100 Continue The server received the request headers and the client should send the body.
- 101 Switching Protocols The server is switching to the protocol the client asked for in the
Upgradeheader. - 103 Early Hints Preliminary headers sent before the final response so the browser can start preloading resources.
2xx Success
The request was received, understood and accepted.
- 200 OK The request succeeded.
- 201 Created The request succeeded and a new resource was created.
- 202 Accepted The request was accepted for processing, but processing has not finished.
- 204 No Content The request succeeded and there is no body to return.
- 206 Partial Content The server is returning only part of the resource, as requested with a
Rangeheader.
3xx Redirection
Further action is needed, usually following another URL.
- 301 Moved Permanently The resource has permanently moved to the URL in the
Locationheader. - 302 Found The resource is temporarily at another URL; keep using the original URL in future.
- 303 See Other Fetch the result from another URL using GET.
- 304 Not Modified The cached copy is still valid; no body is sent.
- 307 Temporary Redirect Temporarily redirect to another URL and repeat the request with the same method and body.
- 308 Permanent Redirect Permanently redirect to another URL, keeping the method and body.
4xx Client error
The request is wrong or not allowed — fix the request.
- 400 Bad Request The server can’t process the request because it is malformed.
- 401 Unauthorized Authentication is required or the credentials are invalid.
- 403 Forbidden The server understood who you are but refuses to allow the request.
- 404 Not Found The server can’t find the requested resource.
- 405 Method Not Allowed The resource exists but doesn’t support this HTTP method.
- 406 Not Acceptable The server can’t produce a response in a format the client accepts.
- 408 Request Timeout The server timed out waiting for the client to finish sending the request.
- 409 Conflict The request conflicts with the current state of the resource.
- 410 Gone The resource has been permanently removed and won’t come back.
- 412 Precondition Failed A condition in the request headers (such as
If-Match) was not met. - 413 Content Too Large The request body is larger than the server allows.
- 414 URI Too Long The URL is longer than the server is willing to handle.
- 415 Unsupported Media Type The server doesn’t support the request body’s format.
- 418 I’m a teapot An April Fools’ joke from RFC 2324: the server is a teapot and refuses to brew coffee.
- 422 Unprocessable Content The request is well-formed but its content fails validation.
- 429 Too Many Requests The client sent too many requests in a given time (rate limiting).
- 431 Request Header Fields Too Large The request headers are too large.
- 451 Unavailable For Legal Reasons The resource is blocked for legal reasons, such as a court order or government censorship.
- 499 Client Closed Request (nginx) nginx-specific: the client closed the connection before the server responded.
5xx Server error
The server failed to fulfil a valid request.
- 500 Internal Server Error The server hit an unexpected error.
- 501 Not Implemented The server doesn’t support the functionality required to fulfil the request.
- 502 Bad Gateway A gateway or proxy got an invalid response from the upstream server.
- 503 Service Unavailable The server is temporarily unable to handle the request.
- 504 Gateway Timeout A gateway or proxy didn’t get a response from the upstream server in time.
- 520 Web Server Returned an Unknown Error (Cloudflare) Cloudflare-specific: the origin server returned an empty, unknown or unexpected response.
- 522 Connection Timed Out (Cloudflare) Cloudflare-specific: Cloudflare could not establish a TCP connection to the origin.
- 524 A Timeout Occurred (Cloudflare) Cloudflare-specific: the connection succeeded but the origin didn’t respond within 100 seconds.