HTTP status codes
The three-digit number at the start of every response tells the client what happened. The first digit gives the class; the rest narrows it down. Select a code for what it means in practice and what to do about it.
1xx Informational
The server received the request and the exchange continues. You rarely see these in a browser.
- 100ContinueThe server accepted the request headers and the client may send the body.
- 101Switching ProtocolsThe server agrees to switch to the protocol named in the Upgrade header, most often WebSocket.
- 103Early HintsAn interim response with Link headers so the browser can start loading assets before the final response is ready.
2xx Success
The request worked. The body (if any) is what was asked for.
- 200OKThe request succeeded and the response body contains the requested resource.
- 201CreatedThe request created a new resource, usually after POST or PUT.
- 202AcceptedThe request was accepted for processing, but the processing has not finished.
- 204No ContentThe request succeeded and there is intentionally no response body.
- 206Partial ContentThe server delivers only the byte range the client asked for with a Range header.
3xx Redirection
The resource lives somewhere else, or the client already has a fresh copy.
- 301Moved PermanentlyThe resource has a new permanent URL, given in the Location header.
- 302FoundThe resource is temporarily available under the URL in the Location header.
- 303See OtherTells the client to fetch a different URL with GET, typically after a form submission.
- 304Not ModifiedThe client's cached copy is still valid; the server sends no body.
- 307Temporary RedirectA temporary redirect where the client must repeat the request with the same method and body.
- 308Permanent RedirectA permanent redirect where the client must keep the request method and body.
4xx Client error
Something about the request is wrong: the address, the credentials, the method or the rate.
- 400Bad RequestThe server cannot process the request because it is malformed.
- 401UnauthorizedThe request needs valid authentication credentials.
- 403ForbiddenThe server understood the request but refuses to fulfil it.
- 404Not FoundThe server has nothing at this URL.
- 405Method Not AllowedThe URL exists, but not for this HTTP method.
- 406Not AcceptableThe server cannot produce a response matching the client's Accept headers.
- 408Request TimeoutThe server gave up waiting for the client to finish sending the request.
- 409ConflictThe request conflicts with the current state of the resource.
- 410GoneThe resource was here, has been removed deliberately and will not return.
- 413Content Too LargeThe request body is larger than the server is willing to accept.
- 414URI Too LongThe URL is longer than the server is willing to process.
- 415Unsupported Media TypeThe server does not accept the request body's format.
- 418I'm a teapotAn April Fools' joke from 1998 that some servers still return.
- 421Misdirected RequestThe request reached a server that cannot answer for this hostname.
- 422Unprocessable ContentThe request is well-formed but contains semantic errors, such as failed validation.
- 425Too EarlyThe server refuses to process a request sent in TLS early data, because it could be replayed.
- 426Upgrade RequiredThe server will only answer after the client switches to another protocol.
- 428Precondition RequiredThe server requires a conditional request, such as one with If-Match.
- 429Too Many RequestsThe client sent too many requests in a given time and is being rate limited.
- 431Request Header Fields Too LargeOne header, or all headers together, are too large.
- 451Unavailable For Legal ReasonsThe resource is blocked for legal reasons, such as a court order or sanctions.
5xx Server error
The request looked fine, but the server or something behind it failed.
- 500Internal Server ErrorThe server hit an unexpected error and could not complete the request.
- 501Not ImplementedThe server does not support the functionality needed for this request.
- 502Bad GatewayA proxy or gateway got an invalid response from the server behind it.
- 503Service UnavailableThe server is temporarily unable to handle the request, usually due to overload or maintenance.
- 504Gateway TimeoutA proxy or gateway did not get a response from the upstream server in time.
- 505HTTP Version Not SupportedThe server does not support the HTTP version used in the request.
- 520Web Server Returned an Unknown ErrorCloudflare-specific: the origin server returned an empty, unknown or unexpected response.
- 521Web Server Is DownCloudflare-specific: the origin server refused the connection.
- 522Connection Timed OutCloudflare-specific: the TCP connection to the origin timed out.
- 525SSL Handshake FailedCloudflare-specific: the TLS handshake between Cloudflare and the origin failed.
- 526Invalid SSL CertificateCloudflare-specific: in Full (strict) mode, the origin's certificate is not valid.