HTTP Status Codes
When a user accesses a webpage, their browser sends a request to the server hosting the page. Before the browser can display the webpage, the server returns a header containing an HTTP status code to respond to the browser's request. HTTP status codes provide information about the status of the request.
Categories of HTTP Status Codes
- 1xx (Informational): Indicates that the request has been received and is being processed.
- 2xx (Success): Indicates that the request was successfully received, understood, and accepted.
- 3xx (Redirection): Indicates that further action needs to be taken to complete the request.
- 4xx (Client Error): Indicates that the request contains bad syntax or cannot be fulfilled.
- 5xx (Server Error): Indicates that the server failed to fulfill a valid request.
Types of HTTP Status Codes
HTTP status codes consist of three decimal digits, with the first digit defining the class of response. Responses are divided into five categories:
- 1xx: Informational (100–199) - The server has received the request and the client should continue.
- 2xx: Success (200–299) - The request was successfully received and processed.
- 3xx: Redirection (300–399) - Further action needs to be taken to complete the request.
- 4xx: Client Error (400–499) - The request contains bad syntax or cannot be fulfilled.
- 5xx: Server Error (500–599) - The server failed to fulfill a valid request.
List of HTTP Status Codes
Status Code | English Name | Description |
---|---|---|
100 | Continue | The client should continue with its request. |
101 | Switching Protocols | The server is switching protocols as requested by the client. |
200 | OK | The request was successful. |
201 | Created | The request was successful and a new resource was created. |
202 | Accepted | The request has been accepted for processing but is not complete. |
203 | Non-Authoritative Information | The request was successful but the meta-information is from a copy. |
204 | No Content | The request was successful but no content is returned. |
205 | Reset Content | The request was successful, and the client should reset the view. |
206 | Partial Content | The server is returning partial data for a GET request. |
300 | Multiple Choices | Multiple options for the resource are available. |
301 | Moved Permanently | The resource has been moved to a new URI permanently. |
302 | Found | The resource has been found at a different URI temporarily. |
303 | See Other | The response can be found at a different URI using GET. |
304 | Not Modified | The resource has not been modified since the last request. |
305 | Use Proxy | The resource must be accessed through a proxy. |
306 | (Unused) | This status code is no longer used. |
307 | Temporary Redirect | The resource is temporarily available at a different URI. |
400 | Bad Request | The server cannot understand the request due to bad syntax. |
401 | Unauthorized | Authentication is required to access the resource. |
402 | Payment Required | Reserved for future use. |
403 | Forbidden | The server refuses to fulfill the request. |
404 | Not Found | The server cannot find the requested resource. |
405 | Method Not Allowed | The request method is not allowed for the requested resource. |
406 | Not Acceptable | The server cannot generate a response acceptable to the client. |
407 | Proxy Authentication Required | Authentication with the proxy is required. |
408 | Request Time-out | The server timed out waiting for the request. |
409 | Conflict | The request could not be processed due to a conflict. |
410 | Gone | The resource is no longer available and will not be available again. |
411 | Length Required | The request did not specify the length of its content. |
412 | Precondition Failed | The server does not meet one of the preconditions in the request. |
413 | Request Entity Too Large | The request entity is too large for the server to process. |
414 | Request-URI Too Large | The URI provided was too long for the server to process. |
415 | Unsupported Media Type | The server does not support the media format of the request. |
416 | Requested range not satisfiable | The range specified cannot be fulfilled. |
417 | Expectation Failed | The server cannot meet the requirements of the Expect request-header. |
418 | I'm a teapot | This is a joke status code from the HTCPCP protocol. |
500 | Internal Server Error | The server encountered an error and cannot complete the request. |
501 | Not Implemented | The server does not support the functionality required to fulfill the request. |
502 | Bad Gateway | The server received an invalid response from the upstream server. |
503 | Service Unavailable | The server is currently unavailable (overloaded or down). |
504 | Gateway Time-out | The server 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. |
These status codes may vary in actual HTTP responses, and their specific values depend on the server's configuration and processing logic.