Complete List of HTTP Status Codes

By: Sunil Kumar |  In: Web Developement  |  Last Updated: 2017/09/20

Complete List of HTTP Status Codes

HTTP status codes or browser error codes or internet error codes are standard response codes given by web site servers on the Internet. It’s an message from the server to letting you know how things went when you requested to view a web page.

Whenever you send a request to the server, you always get a status code associated with the response.
The codes help identify the cause of the problem when a web page or other resource does not load properly.

Classes of HTTP Status Codes

Status codes are divided into 5 classes

  • 100’s: Informational codes indicating that everything so far is OK and the client may continue to the request.
  • 200’s: This class represent the success of the request.
  • 300’s: This class represent the redirection of the resources.
  • 400’s: Client error codes indicating that there was a problem with the request.
  • 500’s: Server error codes indicating that the request was accepted, but that an error on the server and not able to serve the request for some reason.

List of HTTP Status Codes

Information responses

100 Continue

The initial part of a request has been received and has not yet been rejected by the server. The server intends to send a final response after the request has been fully received and acted upon.

101 Switching Protocol

The server understands and is willing to comply with the client’s request, via the Upgrade header field1, for a change in the application protocol being used on this connection.

Successful responses

200 OK

The payload sent in a 200 response depends on the request method. For the methods defined by this specification, the intended meaning of the payload can be summarized as:

  • GET: The resource has been fetched and is transmitted in the message body.
  • HEAD: The entity headers are in the message body.
  • POST: The resource describing the result of the action is transmitted in the message body.
  • TRACE: The message body contains the request message as received by the server

201 Created

The request has been fulfilled and has resulted in one or more new resources being created. The 201 response payload typically describes and links to the resource(s) created.

202 Accepted

The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.

203 Non-Authoritative Information

The request was successful but the enclosed payload has been modified from that of the origin server’s 200 OK response by a transforming proxy.
This status code allows the proxy to notify recipients when a transformation has been applied since that knowledge might impact later decisions regarding the content.

204 No Content

The server has successfully fulfilled the request and that there is no additional content to send in the response payload body.
For example, if a 204 status code is received in response to a PUT request and the response contains an ETag header field, then the PUT was successful and the ETag field-value contains the entity-tag for the new representation of that target resource.

205 Reset Content

The server has fulfilled the request and desires that the user agent reset the “document view”, which caused the request to be sent, to its original state as received from the origin server.

206 Partial Content

This response code is used because of range header sent by the client to separate download into multiple streams

Redirection messages

300 Multiple Choice

The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.

301 Moved Permanently

The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.
A 301 response is cacheable by default i.e. unless otherwise indicated by the method definition or explicit cache controls

302 Found

This response code means that URI of the requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.

303 See Other

Server sent this response to directing the client to get requested resource to another URI with a GET request.

304 Not Modified

A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to false.

305 Use Proxy

This means requested response is now deprecated and must be accessed by a proxy. This response code is not largely supported because of security reasons.

306 unused

This response code is no longer used, it is just reserved currently. It was used in a previous version of the HTTP 1.1 specification.

307 Temporary Redirect

The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.

This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.

308 Permanent Redirect

This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header.

This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.

Client error responses

400 Bad Request

The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

401 Unauthorized

Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.

402 Payment Required

This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.

403 Forbidden

The server understood the request but refuses to authorize it. It means the client does not have access rights to the content so the server is rejecting to give a proper response.

404 Not Found

The server can not find requested resource. This response code probably is most famous one due to its frequency to occur in the web.

405 Method Not Allowed

The method received in the request-line is known by the origin server but not supported by the target resource.

406 Not Acceptable

This response is sent when the web server, after performing server-driven content negotiation, doesn’t find any content following the criteria given by the user agent.

407 Proxy Authentication Required

Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy.

408 Request Timeout

The server did not receive a complete request message within the time that it was prepared to wait.

409 Conflict

The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request.

410 Gone

This response would be sent when requested content has been removed from the server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 Not Found ought to be used instead.

411 Length Required

Server rejected the request because the Content-Length header field is not defined and the server requires it.

412 Precondition Failed

This response code allows the client to place preconditions on the current resource state (its current representations and metadata) and, thus, prevent the request method from being applied if the target resource is in an unexpected state.

413 Payload Too Large

The server is refusing to process a request because the request payload is larger than the server is willing or able to process.

414 URI Too Long

If the server refusing the request because the URI requested by the client is longer than the server is willing to interpret.

415 Unsupported Media Type

The media format of the requested data is not supported by the server, so the server is rejecting the request.

416 Requested Range Not Satisfiable

The range specified by the Range header field in the request can’t be fulfilled; it’s possible that the range is outside the size of the target URI’s data.

417 Expectation Failed

This response code means the expectation indicated by the Expect request header field can’t be met by the server.

421 Misdirected Request

The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI.

426 Upgrade Required

The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.

428 Precondition Required

The origin server requires the request to be conditional.

429 Too Many Requests

This code is generated when the client sent too many request in a given amount of time.

431 Request Header Fields Too Large

The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.

451 Unavailable For Legal Reasons

The user requests an illegal resource, such as a web page censored by a government.

Server error responses

500 Internal Server Error

The server encountered an unexpected condition when it doesn’t know how to handle and prevented it from fulfilling the request.

501 Not Implemented

The server does not support the functionality required to fulfil the request.

502 Bad Gateway

This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

504 Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.

505 HTTP Version Not Supported

The server does not support or refuses to support, the major version of HTTP that was used in the request message.

506 Variant Also Negotiates

The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself and is therefore not a proper end point in the negotiation process.

507 Insufficient Storage

The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary.

511 Network Authentication Required

The 511 status code indicates that the client needs to authenticate to gain network access.


Leave a Comment

Your email address will not be published.


Sunil Kumar

I am the owner of acmeextension. I am a passionate writter and reader. I like writting technical stuff and simplifying complex stuff.
Know More

Join more than 10,000 others Web Developers