Author : Rahul
Last Modified : 05-Sep-2020
Complexity : Intermediate

HTTP Response Status Code


Status codes are issued by the server in response to the client's request made to the server. It includes codes from IETF Request for Comments (RFCs).

All HTTP response status codes are divided into five classes. The first digit of the status code defines the class of response and the last two digits do not have any classification. These classes are:

  1. 1xx Informational
    It means the request was received and continuing process.
  2. 2xx Successful
    It means the request was successfully received and accepted.
  3. 3xx Redirection
    It means further action needs to be taken to complete the request.
  4. 4xx Client Error
    It means the request contains invalid syntax or cannot be completed.
  5. 5xx Server Error
    It means the server failed to complete the request.

Some major HTTP status codes under each class are as follow:

1xx : Informational

Status Code Message Description
100 Continue This code indicates that the initial part of the request has been received and has not yet been rejected by the server. The server intends to send the final response after the request has been fully received and acted upon.
101 Switching Protocols This code indicates that the server switches the protocol.
102 Processing This code indicates that the server has accepted the complete request, but has not yet completed it.


2xx : Successful

Status Code Message Description
200 OK This code indicates that the request is OK.
201 Created This code indicates that the request is complete and the new item is created.
202 Accepted This code indicates that the request is accepted for processing but processing is not completed.
203 Non-Authoritative Information This code indicates that the request is accepted for processing but not completed.
204 No Content This code indicates that the server successfully processes the request but does not return any data.
205 Reset Content This code indicates that the server successfully processed the request and asks that the requester reset its form.
206 Partial Content This code indicates that the request is accepted for processing but not completed.


3xx : Redirection

Status Code Message Description
300 Multiple Choice This code indicates that the user can select a link and go to that location.
301 Moved Permanently This code indicates that the requested resource has been moved to a new url
302 Found This code indicates that the requested resource has been temporarily moved to a new url
303 See Other This code indicates that the response to the request can be found under another URL using the GET method.
304 Not Modified This code indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
305 Use Proxy This code indicates that the requested URL must be accessed through the proxy mentioned in the Location header.
306 Switch Proxy This code indicates that the, it is not in use.
307 Temporary Redirect This code indicates that the requested resource has been moved temporarily to a new URL.
308 Permanent Redirect This code indicates that the requested resource has been moved to a new URL.


4xx : Client Error

Status Code Message Description
400 Bad Request This code indicates that the server cannot process the request.
401 Unauthorized This code indicates that the requested resource needs a username and a password.
402 Payment Required Reserved for future use.
403 Forbidden This code indicates that the request contained valid data and was understood by the server, but the server is refusing action due to lack of necessary permission.
404 Not Found This code indicates that the requested resource can not be found.
405 Method Not Allowed This code indicates that the requested method is not supported for the requested resource.
406 Not Acceptable This code indicates that the requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
407 Proxy Authentication Required This code indicates that the client must first authenticate itself with the proxy.
408 Request Timeout This code indicates that the request took longer than the server was prepared to wait.
409 Conflict This code indicates that the request could not be completed because of a conflict.
410 Gone This code indicates that the requested resource is no longer available.
411 Length Required This code indicates that the "Content-Length" is not defined. The server will not accept the request without it.
412 Precondition Failed This code indicates that the server evaluates the precondition which is given in the request and it is false.
413 Request Entity Too Large This code indicates that the server will not accept the request, because the request entity is too large.
414 Request-URL Too Long This code indicates that the server will not accept the request because the requested URL is too large.
415 Unsupported Media Type This code indicates that the server will not accept the request, because the media type is not supported.
416 Requested Range Not Satisfiable This code indicates that the client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
417 Expectation Failed This code indicates that the server cannot meet the requirements of the Expect request-header field.
421 Misdirected Request This code indicates that the request was directed at a server which is unable to produce the response.
423 Locked This code indicates that the server accessed a locked resource.
424 Failed Dependency This code indicates that the request failed because it depended on another failed request.
429 Too Many Requests This code indicates that the user has sent too many requests in a given amount of time.
431 Request Header Fields Too Large This code indicates that the server is unable to process the request because one of the header fields is too large.


5xx : Server Error

Status Code Message Description
500 Internal Server Error This code indicates that the generic error message, given when an unexpected condition was encountered.
501 Not Implemented This code indicates that the server does not recognize the request method.
502 Bad Gateway This code indicates that the server was acting as a proxy and received an invalid response from the upstream server.
503 Service Unavailable This code indicates that the server is temporarily overloading or down.
504 Gateway Timeout This code indicates that the gateway has timed out.
505 HTTP Version Not Supported This code indicates that the server does not support "HTTP protocol".
507 Insufficient Storage This code indicates that the server is unable to store the representation needed to complete the request.
508 Loop Detected This code indicates that the server detected an infinite loop while processing the request.
511 Network Authentication Required This code indicates that the client needs to authenticate to gain network access.