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 codeStatus messageDescription
0Invalid URL/Domain or Time OutIt 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 codeStatus messageDescription
100ContinueThe server successfully processed the request. Generally, this means that the server provided the requested page.
101Switching ProtocolsRequest was sent to switch protocols and the server has acknowledged.

2xx Successful

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

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

3xx Redirection

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

Status codeStatus messageDescription
300Multiple ChoicesThe 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.
301Moved PermanentlyThe 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.
302Moved TemporarilyThe 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.
303See OtherTells 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.
304Not ModifiedThe 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.
305Use ProxyThe 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.
307Temporary RedirectThe 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 codeStatus messageDescription
400Bad RequestThe server didn't understand the syntax of the request.
401UnauthorizedThe 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.
403ForbiddenThe server is refusing the request. Unlike a 401 unauthorized response, authenticating will make no difference.
404Not FoundThe 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.
405Method Not AllowedA 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.
406Not AcceptableClients 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.
407Proxy Authentication RequiredLike the 401 status code, but used for proxy servers that require authentication for a resource.
408Request TimeoutIf a client too long to complete its request, a server can send back this status code and close down the connection.
409ConflictThe request is causing some conflict on a resource.
410GoneThe 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.
411Length RequiredServer 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.
412Precondition FailedIf a client makes a conditional request and one of the conditions fails, this response code is returned.
413Request Entity Too LargeThe client sent an entity body that is larger than the server can or want to process.
414Request-URI Too LongThe client sent a request with a request URL that is larger that what the server can or wants to process.
415Unsupported Media TypeThe client sent an entity of a content type that the server does not understand or support.
416Requested Range Not SatisfiableThe request message requested a range of a given resoure, and that range either was invalid or could not be met.
417Expectation FailedThe 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 codeStatus messageDescription
500Internal Server ErrorThe server encountered something it didn't expect and was unable to complete the request.
501Not ImplementedThe client made a request that is beyond the server's capabilities.
502Bad GatewayA server acting as a proxy or gateway encountered a bogus reponse from the next link in the request reponse chain.
503Service UnavailableThe server is currently unavailable (due to a server overload or because it's down for maintenance). Generally, this is a temporary state.
504Gateway TimeoutJust 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.
505HTTP Version Not SupportedThe server received a request in a version of the protocol that it can't or won't support.