HTTP Status codes are returned by the web server to the client software to determine the outcome of a request. These are also referred as HTTP response status codes. The following HTTP status codes are based on HTTP/1.1.
Each HTTP status code is a three digit number. The first digit of the status code specifies one of five classes of response:
- 1XX—Information
- 2XX—Successful
- 3XX—Redirection
- 4XX--Client Error
- 5XX--Internal Server Error
1. 1XX—Informational
The status codes starting with 1XX indicate a provisional response, consisting only of the Status-Line and optional headers, and are terminated by an empty line.
|
Code
|
Message |
Description |
| 100 |
Continue |
It tells the client that the first part of the request has been received by the server and that it should continue with the rest of the request or ignore if the request has been already fulfilled. |
| 101 |
Switching Protocols |
It tells the client that the server will switch protocols to those defined by the response's Upgrade header field immediately after the empty line which terminates the 101 response during the current connection. |
2. 2XX—Successful
The status code starting with 2XX indicates that the client's request was successfully received, understood, and accepted.
|
Code
|
Message |
Description |
| 200 |
OK |
It tells the client that the request is successfully executed by the web server and the response is returned to the client. It is also a standard response for all successful HTTP requests. |
| 201 |
Created |
The request has been fulfilled and it resulted in new resource being created. The newly created resource can be referenced by the URI(s) found in the Location header field of the response returned by the web server. |
| 202 |
Accepted |
The request has been accepted for processing but the process has not been completed. |
| 203 |
Non-Authoritative Information |
The returned meta information in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party server. |
| 204 |
No Content. |
The server has fulfilled the request but does not need to return any entity body. |
| 205 |
Reset Content. |
The server has fulfilled the request and the user agent should reset the document view, which caused the request to be sent. |
| 206 |
Partial Content. |
The server has fulfilled the partial get request for the resource. The request must have included the range or an If condition to the header field to make that request partial. |
3. 3XX—Redirection
The status codes starting with 3XX indicate that further action needs to be taken by the user agent in order to fulfil the request.
|
Code
|
Message |
Description |
| 300 |
Multiple Choices |
The request resource corresponds to any one of the sets of requested representations. User can select preferred representation and redirect his request to that location. |
| 301 |
Moved Permanently |
The requested resource has been assigned a new URL and any future reference to that resource should use one of the returned URL. |
| 302 |
Found |
The requested URL is temporarily under a different URL. And future reference to that resource should use one of the returned URL. |
| 303 |
See Other |
The response to the request can be found under a different URL and should be retrieved using a GET method on that resource. |
| 304 |
Not Modified |
If the client has performed a conditional GET request and access is allowed, but the document has not been modified, the server should respond with this status code. |
| 305 |
Use Proxy |
The requested resource must be accessed through the proxy given by the Location field. |
| 306 |
No longer Used |
No longer Used |
| 307 |
Temporary Redirect |
The requested resource is temporarily under a different URL. |
| |
|
|
|
4. 4XX--Client Error
The status codes starting with 4XX indicate that the client seems to have erred.
|
Code
|
Message |
Description |
| 400 |
Bad Request. |
The server could not understand the request because of the incorrect syntax. |
| 401 |
Unauthorized User. |
Authentication is required. |
| 402 |
Reserved for future use. |
Reserved for future use. |
| 403 |
Access Denied/Forbidden. |
The server understands the request but the access is forbidden. |
| 404 |
Page not found. |
The server has not found anything matching the requested URL and no forwarding address is known. |
| 405 |
Method not allowed. |
The method specified in the request URL is not allowed for the resource requested by the URL. |
| 406 |
Not Acceptable. |
Server cannot generate response that the client is willing to accept. |
| 407 |
Proxy Authentication Required. |
The client must authenticate itself with the proxy. |
| 408 |
Request Timed out. |
The server stopped waiting for client requests. |
| 409 |
Conflict. |
Server could not complete the request because of the current state of the requested resource. |
| 410 |
Gone. |
Similar to 404 but the condition is expected to be permanent. |
| 411 |
Length Required. |
Server requires content length in the request URL. |
| 412 |
Precondition Failed. |
One or more of the preconditions given in the request header failed when tested on the server. |
| 413 |
Request Entity Too Large. |
The request is not processed because the Request Entity is larger than the server is able to process. |
| 414 |
Request URL Too Large. |
The request is not processed because the Request URL is larger than the server is able to process. |
| 415 |
Unsupported Media Type. |
The request is not processed because the format type of the request resource, method and the entity are different. |
5. 5XX--Internal Server Error
The server encountered an internal error that prevented it from fulfilling the request.
|
Code
|
Message |
Description |
| 500 |
Server Error. |
The request was unsuccessful due to an unexpected condition encountered by the server. |
| 501 |
No Server. |
The server either does not recognise the request method, or it lacks the ability to fulfil the request. |
| 502 |
Server Overloaded. |
The Upstream Server being used by the web server has sent an invalid response. |
| 503 |
Service Unavailable. |
Service Unavailable because of maintenance or overload. |
| 504 |
Gateway Timeout. |
The upstream server failed to send a request in the time allowed by the server. |
| 505 |
HTTP version not supported. |
Server does not support the HTTP Protocol version that was used in the request message. |
Source: W3C