HTTP Status Codes
HTTP status codes indicates whether a specific HTTP request has been successfully completed. These status codes are issued by the server. HTTP status codes are sent with response by server.
HTTP Status Code Series
- 1xx Informational Codes (100–199)
- 2xx Success Codes (200–299)
- 3xx Redirection Codes (300–399)
- 4xx Client Error Codes (400–499)
- 5xx Server Error Codes (500–599)
1. 1xx Informational Codes (100–199)
An informational response codes indicate that the request was received and understood.
100 - Continue
Indicates that the client should continue with the request or ignore the response if the request is completed.
101 - Switching Protocols
Sent in response to an ‘upgrade’ request header which indicates, which protocol the server is switching.
102 - Processing
Indicates that server received and processing the request, but no response available yet.
2. 2xx Success Codes (200–299)
This class of status codes indicates the action requested by the client was received, understood, and accepted.
200 - Ok
Indicates that the request succeeded and it also depends on the HTTP method.
201 - Created
This indicates that the sent request has succeeded, also a new resource was created as a result. 201 status code is sent after POST or PUT HTTP requests.
202 - Accepted
Indicates that the request has received. But not responded to the request yet.
3. 3xx Redirection Codes (300–399)
These status codes indicates that the client must take additional action to complete the request. Redirection status codes are used in URL redirection.
300 - Multiple Choices
This indicates the request has more than one possible response and user agent or user should choose one.
301 - Moved Permanently
Indicates that the URL of requested has been changed permanently and a new URL is given in the response.
302 - Found
In this status code, the URI of requested resource has been changed temporarily.
305 - Use Proxy
This indicates the requested response must be accessed by a proxy.
306 - Unused
This status code is no longer used and it is just reserved.
4. 4xx Client Error Codes (400–499)
400 - Bad Request
Indicates that the server cannot or will not process the request due to client error. For example :- malformed request syntax.
401 - Unauthorized
In this status code, it indicates that the client must authenticate.
402 - Payment Required
This indicates reserved for future use, by digital payment systems.
403 - Forbidden
Here, the client doesn’t have rights to the content. So, server refuse or ignore the request. Also, the client’s identity is known to the server.
404 - Not Found
In this status code, the server cannot find the requested resource.
405 - Method Not Allowed
Indicates that the request method is known by the server but is not supported by the target resource.
406 - Not Acceptable
This response is sent when the web server, after performing server-driven content negotiation and finds contents which doesn’t need the criteria set by user agent.
407 - Proxy Authentication Required
This status code is similar to 401 Unauthorized, but in this status code the authentication has to be done by a proxy.
408 - Request Timeout
Indicates the requested session timeout occurs and also this timeout happens when the connection is unused.
409 - Conflict
This status code is sent when a request conflicts with the current state of server.
410 - Gone
This indicates that the requested content is not there or permanently deleted from server with no forwarding address.
5. 5xx Server Error Codes (500–599)
500 - Internal Server Error
Here, server encountered a situation which doesn’t know how to handle.
501 - Not Implemented
This indicates that the request method is not supported by server or cannot be handled.
502 - Bad Gateway
In this status code, server received an invalid response while acting as a gateway to get the response needed to process the request.
503 - Service Unavailable
Here, server is not ready to handle request and the causes can be server maintenance or overloaded.
504 - Gateway Timeout
Indicates that the server is acting as a gateway and cannot get response in time.
505 - HTTP Version Not Supported
This indicates the HTTP version used in request is not supported by the server.