HTTP status codes tell the client about the sever's response to a particular request. We receive the status code in the response header sent from the server. 404 is one of the most popular status code which shows up when a resource you requested is not found.
HTTP status codes are categorized into five classes. all the codes in these classes have a specific meaning.
The five classes are :
These status codes from 100-199 are informational responses. The most common status code is 100(continue), indicating that everything so far is fine and that the client should continue the request.
These status codes from 200-299 indicate successful responses. The most common status code is 200 which means OK. The term successful response depends upon the HTTP method in which the request is sent to the server. For eg: if it was the GET method, a status code of 200 means the resource has been fetched successfully.
These status codes from 300-399 indicate redirection. This means that the resource you are trying to access may be moved temporarily or permanently to another location and the client is redirected to the new location. The most common one is 301 which means the requested resource has been moved permanently to a new location.
These status codes from 400 - 599 indicated client errors. This may be due to an incorrect URL or trying to access something that is not available or which we are not allowed to access or any other reason the client needs to take care of. The most common codes are 403 which means that the client is not authorized to access the resource and 404 which means that the requested resource is not found. Some servers also send this instead of 403 to hide the existence of a resource from an unauthorized client.
These status codes from 500-599 indicate server errors. This means that the request from the client was accepted but cannot be fulfilled due to issues with the server. The most common response is 503(service unavailable) which means that server is not ready to handle the request. This might be due to the overloading of the server or as the server is down for maintenance.
Note: There might be other status codes that do not belong to this category which are specific to some servers and all the status codes from 100-600 are not standard. Status codes are guided by section 10 of RFC 2616.
Top comments (0)