HTTP Status Codes are the server’s responses to the client’s (browser’s) requests. We can understand the request handling situation through status codes. The definitions of the status codes are in the RFC 2616 specification, which provides more detailed information.
When developing HTTP-related applications, you often encounter different status codes. This article organizes common status codes, hoping to be helpful.
01
HTTP Status Code Starting with 1
1xx (Informational) indicates a provisional response, requiring the requester to continue the operation. Code Description
100 (Continue) The requester should continue with the request. The server returns this code to indicate that the first part of the request has been received and is waiting for the rest.
101 (Switching Protocols) The requester has asked the server to switch protocols, and the server has agreed and is preparing to switch.
02
HTTP Status Code Starting with 2
2xx (Success) indicates that the request was successfully processed. Code Description
200 (OK) The server has successfully processed the request. Typically, this means the server provided the requested web page.
201 (Created) The request was successful, and the server created a new resource.
202 (Accepted) The server has accepted the request but has not yet processed it.
203 (Non-Authoritative Information) The server successfully processed the request but is returning information that may be from another source.
204 (No Content) The server successfully processed the request but is not returning any content.
205 (Reset Content) The server successfully processed the request but is not returning any content.
206 (Partial Content) The server successfully processed part of a GET request.
03
HTTP Status Code Starting with 3
3xx (Redirection) indicates that further action is needed to complete the request. These status codes are usually used for redirection. Code Description
300 (Multiple Choices) The server can perform multiple actions for the request. The server can choose one action based on the requester (user agent), or provide a list of actions for the requester to choose from.
301 (Moved Permanently) The requested web page has been permanently moved to a new location. When the server returns this response (for a GET or HEAD request), it automatically redirects the requester to the new location.
302 (Found) The server is currently responding to the request from a different location, but the requester should continue to use the original location for future requests.
303 (See Other) The requester should use a separate GET request to retrieve the response from a different location.
304 (Not Modified) The requested web page has not been modified since the last request. When the server returns this response, it does not return the web page content.
305 (Use Proxy) The requester can only access the requested web page through a proxy. If the server returns this response, it also indicates that the requester should use a proxy.
307 (Temporary Redirect) The server is currently responding to the request from a different location, but the requester should continue to use the original location for future requests.
04
HTTP Status Code Starting with 4
4xx (Client Error) These status codes indicate that the request may be incorrect, preventing the server from processing it. Code Description
400 (Bad Request) The server cannot understand the request’s syntax.
401 (Unauthorized) The request requires authentication. For pages that need a login, the server might return this response.
403 (Forbidden) The server refuses to fulfill the request.
404 (Not Found) The server cannot find the requested web page.
405 (Method Not Allowed) The method specified in the request is not allowed.
406 (Not Acceptable) The server cannot generate a response that is acceptable to the client based on the request’s content characteristics.
407 (Proxy Authentication Required) This status code is similar to 401 (Unauthorized), but it indicates that the requester must authenticate using a proxy.
408 (Request Timeout) The server timed out waiting for the request.
409 (Conflict) The server encountered a conflict while completing the request. The server must include information about the conflict in the response.
410 (Gone) The requested resource has been permanently deleted, and the server returns this response.
411 (Length Required) The server does not accept requests without a valid content-length header field.
412 (Precondition Failed) The server does not meet one of the preconditions that the requester put on the request.
413 (Payload Too Large) The server cannot process the request because the request payload is too large and exceeds the server’s processing capacity.
414 (URI Too Long) The request URI (usually the URL) is too long for the server to process.
415 (Unsupported Media Type) The format of the request is not supported by the requested page.
416 (Range Not Satisfiable) The server cannot provide the requested range of the page.
417 (Expectation Failed) The server cannot meet the requirements of the “Expect” request header field.
05
HTTP Status Code Starting with 5
5xx (Server Error) These status codes indicate that the server encountered an internal error while trying to process the request. These errors may be due to problems with the server itself rather than the request. Code Description
500 (Internal Server Error) The server encountered an error and could not complete the request.
501 (Not Implemented) The server does not have the functionality to fulfill the request. For example, this code may be returned when the server does not recognize the request method.
502 (Bad Gateway) The server, acting as a gateway or proxy, received an invalid response from the upstream server.
503 (Service Unavailable) The server is currently unavailable (due to overload or maintenance). Typically, this is a temporary state.
504 (Gateway Timeout) The server, acting as a gateway or proxy, did not receive a timely response from the upstream server.
505 (HTTP Version Not Supported) The server does not support the HTTP protocol version used in the request.
Related:
- Why Python Is the Top Choice for Artificial Intelligence
- 2025 AI Server Industry Expected to Hit $298B in Revenue
- Windows Server 2016 Wins, But Businesses Cling to 2012!
Disclaimer: This article is created by the original author. The content of the article represents their personal opinions. Our reposting is only for sharing and discussion purposes and does not imply our endorsement or agreement. If you have any objections, please get in touch with us through the provided channels.