HTTP Status Codes

HTTP Status Codes are numbers (or codes) that are returned by the server following a browser request. These numbers indicate whether a request was successful or had an error. Error status codes also specify the type of the error, such as, not found, inaccessible, or moved.

HTML Reference

Example

 200 OK = code for successful HTTP request.
 404 Not Found = code for requested page was not found.


HTTP Status Code Groups

HTTP Status Codes are grouped in numeric ranges.

Range Description
100 - 199 Informational codes
200 - 299 Success codes
300 - 399 Redirection codes
400 - 499 Client error codes
500 - 599 Server error codes

Tip:  Familiarity with these codes is helpful as they play a key part in web development.

All HTTP Status Codes are listed below with a description.

100-199: Information

Status codes that return an informational message about the request.

Message Description
100 Continue Server has received the request headers and lets the client send the request body
101 Switching Protocols A server switch of protocol has been asked for by the requester
103 Checkpoint Displays a resumable request option to resume aborted PUT or POST requests

200-299: Success

Status codes that indicate a successful request.

Message Description
200 OK The standard response for successful HTTP requests.
201 Created The request is successful and created a new resource.
202 Accepted The request is only accepted for processing but not completed.
203 Non-Authoritative Information The request is successful but returns an information from another source
204 No Content The request is successful without any returned content
205 Reset Content The request is successful without any returned content and require the requester to refresh the document
206 Partial Content The server is returning only a part of the resource due to range header sent by requester

300-399: Redirection

Status codes that are notifications related to a redirect.

Message Description
300 Multiple Choices Displays a link list where the user can select a link and go to that location.
301 Moved Permanently The requested page has moved to a new URL permanently
302 Found The requested page has moved to a new URL temporarily
303 See Other The requested page can be found under a different URL
304 Not Modified The requested page has not been modified since last request
306 Switch Proxy No longer used
307 Temporary Redirect The requested page has moved to a new URL temporarily
308 Resume Incomplete Used for resumable requests to resume aborted PUT or POST requests

400-499: Client Error

Status codes that indicate an error occured that was caused by the client.
The 404 error is a well-known error, which indicates 'page not found'.

Message Description
400 Bad Request The request cannot be completed because to bad syntax
401 Unauthorized The request is valid but the server is not responding. It is usually used for failed authentication
402 Payment Required Reserved for future use
403 Forbidden The request was valid but the server is not responding
404 Not Found The requested page could not be found in the server but might be available in the future
405 Method Not Allowed The request method made was not supported by the page
406 Not Acceptable The server generates a response that is not accepted by the client
407 Proxy Authentication Required The client is required to authenticate with the proxy before requesting
408 Request Timeout The server timed out waiting for the request
409 Conflict A conflict in the request happened which cannot complete it
410 Gone The requested page is no longer available
411 Length Required The "Content-Length" is not defined. The server will not accept the request without it
412 Precondition Failed The request precondition result to false by the server
413 Request Entity Too Large The server will not accept the request due to request entity being too large
414 Request-URI Too Long The server will not accept the request, because the URL is too long. This may happen if a POST request is converted into GET request causing long queries
415 Unsupported Media Type The server will not accept the request due to unsupported media type
416 Requested Range Not Satisfiable The requester asked the server for a portion of the file which cannot be provided by the server
417 Expectation Failed The server cannot meet the requirements of the Expect request-header field

500-599: Server Error

Status codes that indicate an error occurred on the server.

Message Description
500 Internal Server Error A generic error message displayed when no specific error message can be used
501 Not Implemented The server does not recognize the request method or cannot complete the request
502 Bad Gateway The server was acting as a gateway or proxy and received an invalid response from the upstream server
503 Service Unavailable The server is currently unavailable (overloaded or down)
504 Gateway Timeout The server was acting as a gateway or proxy and 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
511 Network Authentication Required The client needs to authenticate to gain network access

You may also like

Guides