HTTP Status Codes

An overview of the most common HTTP Status Codes

0 Server not found or time out

Status codes that indicate that the server Server not found or time out processed the request.

Status code Status message Description
0 Invalid URL/Domain or Time Out It is has an Invalid URL/Domain or execution Time Out, you will very likely get the HTTP code 0.

1xx Informational

Status codes that indicate that the server Informational processed the request.

Status code Status message Description
100 Continue The server successfully processed the request. Generally, this means that the server provided the requested page.
101 Switching Protocols Request was sent to switch protocols and the server has acknowledged.

2xx Successful

Status codes that indicate that the server Successful processed the request.

Status code Status message Description
200 OK The server successfully processed the request. Generally, this means that the server provided the requested page.
201 Created The resource was created(for requests that create server objects)
202 Accepted The request was accepted, but the server has not yet performed any action with it
203 Non-Authoritative Information The transaction was okay, except the information contained in the entity headers was not from the origin server, but from a copy of the resource
204 No Content The response message contains headers and a status line,but no entity body.
205 Reset Content Another code primarily for browsers, basically means that the browser should clear any HTML form elements on the current page.
206 Partial Content The partial request was sucessfull.

3xx Redirection

Further action is needed to fulfill the request. Often, these status codes are used for redirection.

Status code Status message Description
300 Multiple Choices The server has several actions available based on the request. The server may choose an action based on the requestor (user agent) or the server may present a list so the requestor can choose an action.
301 Moved Permanently The requested page has been permanently moved to a new location. When the server returns this response, it automatically forwards the requestor to the new location. The response should also include this location. It tells the client to use the new URL the next time it wants to fetch the same resource.
302 Moved Temporarily The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests.
303 See Other Tells the client that the resource should be fetched using a different URL. This new URL is in the location header of the resource has not changed.
304 Not Modified The requested page hasn't been modified since the last request. When the server returns this response, it doesn't return the contents of the page.
305 Use Proxy The resource must be accessed through a proxy, the location of the proxy is given in the Location header.
306 (Unused) Status code is currently not used.
307 Temporary Redirect The server is currently responding to the request with a page from a different location, but the requestor should continue to use the original location for future requests. There is very little difference between a 302 status code and a 307 status code. 307 was created as another, less ambiguous, version of the 302 status code.

4xx Request error

These status codes indicate that there was likely an error in the request which prevented the server from being able to process it.

Status code Status message Description
400 Bad Request The server didn't understand the syntax of the request.
401 Unauthorized The request requires authentication, before a resource can be accessed, the client must be authorized by the server. The server might return this response for a page behind a login.
403 Forbidden The server is refusing the request. Unlike a 401 unauthorized response, authenticating will make no difference.
404 Not Found The server can't find the requested page. For instance, the server often returns this code if the request is for a page that doesn't exist on the server.
405 Method Not Allowed A request wasmade with a method that is not supported for the requested URL.The Allow header should be included in the response to tell the client what methods are allowed on the requested resource.
406 Not Acceptable Clients can specify parameters about what types of entities they are willing to accept. This code is used when the server has no resource matching the URL that is acceptable for the client.
407 Proxy Authentication Required Like the 401 status code, but used for proxy servers that require authentication for a resource.
408 Request Timeout If a client too long to complete its request, a server can send back this status code and close down the connection.
409 Conflict The request is causing some conflict on a resource.
410 Gone The server returns this response when the requested resource has been permanently removed. It is similar to a 404 (Not found) code, but is sometimes used in the place of a 404 for resources that used to exist but no longer do. If the resource has permanently moved, you should use a 301 to specify the resource's new location.
411 Length Required Server use this code when they require a Content-Length header in the request message.The server will not accept requests for the resource without the Content-Length header.
412 Precondition Failed If a client makes a conditional request and one of the conditions fails, this response code is returned.
413 Request Entity Too Large The client sent an entity body that is larger than the server can or want to process.
414 Request-URI Too Long The client sent a request with a request URL that is larger that what the server can or wants to process.
415 Unsupported Media Type The client sent an entity of a content type that the server does not understand or support.
416 Requested Range Not Satisfiable The request message requested a range of a given resoure, and that range either was invalid or could not be met.
417 Expectation Failed The request contained an expection in the Expect request header that could not be satisfied by the server.

5xx Server error

These status codes indicate that the server had an internal error when trying to process the request. These errors tend to be with the server itself, not with the request.

Status code Status message Description
500 Internal Server Error The server encountered something it didn't expect and was unable to complete the request.
501 Not Implemented The client made a request that is beyond the server's capabilities.
502 Bad Gateway A server acting as a proxy or gateway encountered a bogus reponse from the next link in the request reponse chain.
503 Service Unavailable The server is currently unavailable (due to a server overload or because it's down for maintenance). Generally, this is a temporary state.
504 Gateway Timeout Just like 408 status code, expect that the response is comming from a geteway or proxy that has timed out waiting for a reponse to its requests from another server.
505 HTTP Version Not Supported The server received a request in a version of the protocol that it can't or won't support.