HTTP Status Code

The Server issues an HTTP Status Code in response to a request of the client made to the server. Status code is a 3-digit integer. The first digit of status code is used to specify one of five standard classes of responses. The last two digits of status code do not have any categorization role.

The status codes are divided into 5 parts, as follows:

S.N.

Code and Description

1

1xx: Informational Response
It is used to show that the request was received, and the process is continuing.

2

2xx: Successful
It is used to show that the request was successfully received, understood, and accepted.

3

3xx: Redirection
It is used to show that further action needs to be taken to complete the request.

4

4xx: Client Error
It is used to show that the request contains bad syntax or cannot be fulfilled.

5

5xx: Server Error
It is used to show that the server is failed to fulfill an apparently valid request.

HTTP status codes are extensible. The application of HTTP is not required o understand the meaning of all the registered status code. A list of all the status codes is given below:

1xx: Information

Message

Description

100 Continue

It is used to show that the client should continue with its request. The interim response informs the client that the request?s initial part has been received.

101 Switching Protocols

It is used to switches the server.

102 Processing

This code is used to show that the server has received and is processing the request. It indicates that no response is available yet.

103 Early Hints

This code is used to return the headers of some responses before the final HTTP message.

2xx: Successful

Message

Description

200 OK

This code is used to show that the request is OK.

201 Created

This code shows that the request has been fulfilled, which results in the creation of a new resource.

202 Accepted

This code shows that the request is accepted for processing, but not yet processed completely.

203 Non-authoritative Information

In the entity-header, the information is from a local third party copy. It is not from the original copy.

204 No Content

This code is used to show that the request is processed successfully by the server and not returning any content.

205 Reset Content

This code is used to tell the user agent to reset the document which sent this request.

3xx: Redirection

Message

Description

300 Multiple Choices

This code is used to indicate that the multiple options for the resource from which the client may choose.

301 Moved Permanently

This code shows that the URL of the requested resource has been changed permanently. In response, the new URL gives.

302 Found

This code is used to show that the requested page has moved temporarily to a new URL.

303 See Other

This code is used to show that the requested page can be found under another URL using the GET method.

304 No Modified

This code is used for caching purposes. It shows the client that the response has not been modified, so the client can continue to use the same response?s cached version.

305 Use Proxy

This code is used to show that using the proxy; the requested URL must be accessed, which is mentioned in the Location header.

306 Unused

In the previous version, this code is used. This response code is no longer used, and it is just reserved.

307 Temporary Redirect

This code is used to show that the requested page has moved temporarily to a new URL.

4xx: Client Error

Message

Description

400 Bad Request

This code is used to indicate that the server did not understand the request due to invalid syntax.

401 Unauthorized

In this code, the requested page needs a username and password.

402 Payment Required

This code reserved for future use.

403 Forbidden

This code is used to show that the access is forbidden to the requested page.

404 No Found

This code is used to show that the server cannot find the requested page.

405 Method Not Allowed

It shows that the request method is not supported for the requested resource.

406 Not Acceptable

It is used to show that the server can only generate a resource that the client does not accept.

407 Proxy Authentication Required

It is used to show that the client must first authenticate itself with the proxy.

408 Request Timeout

This code is used to show that the request took longer than the server was prepared to wait.

5xx: Server Error

Message

Description

500 Internal Server Error

This code is used to show that the server has encountered a situation, and it does not know how to handle it.

501 Not Implemented

This code shows that the request was not completed, and the server did not support the functionally required.

502 Bad Gateway

This code shows that the request was not completed, and the server received an invalid response from the upstream server.

503 Service Unavailable

This code shows that the request was not completed, and the server is temporarily overloading or down.

504 Gateway Timeout

It shows that the gateway has timed out.

505 HTTP Version Not Supported

This code is used to show that the server does not support the "http protocol" version.