404 Status Code - Not Found
In this section you will learn about 404 Status Code, what is it, its components and examples.
What is 404 HTTP Code?
The HTTP Status Code 404, commonly known as "Not Found", is a client error response code that indicates the server cannot find the requested resource. It signifies that the client can communicate with the server, but the server cannot locate what was requested. This error code is one of the most recognizable due to its frequent occurrence on the web.
Understanding 404 Not Found
Resource Unavailable: A
404 Not Found
typically means that the resource the client requested is not available on the server, either because it doesn't exist or the URI is incorrect.
No Indication of State: The absence of the resource does not indicate whether it was temporarily or permanently missing, or if it was removed deliberately.
Descriptive Error Pages: Web servers often provide custom error pages to explain the
404 Not Found
error, sometimes including links to the home page or search functions to assist the user.
Why 404 Not Found?
The 404 Not Found
status code is a standardized way of informing the client that the requested resource is not available, without giving details as to why it's missing. This ambiguity can be helpful in not disclosing whether the resource has been moved or deleted for security reasons.
Characteristics of 404 Not Found
Client Action Required: The code indicates that the client may need to take additional action, such as checking the resource URI or navigating back to a safe point in the application.
Not a Reflection of Server Error: A
404 Not Found
status does not necessarily mean there is an error with the server itself, simply that the specific page or resource is not found.
How does 404 HTTP Code Work?
Client Sends a Request:
The client requests a resource or web page that the server cannot find or doesn't exist.
Server Responds:
The server processes the request, determines that the resource is not available, and issues a
404 Not Found
response.
Example of 404 Not Found
Requesting a Missing Image File:
Response:
In this example, the client attempts to retrieve an image that does not exist on the server. The server responds with a 404 Not Found
status and a custom HTML page informing the user of the missing image.
Conclusion
The 404 Not Found
status code is essential in web communication, signaling to clients that a resource is unavailable without specifying the reason. Understanding and effectively handling 404 Not Found responses is a key skill for web developers and site administrators to improve user experience and website maintenance.
Explore more from Akto
Blog
Be updated about everything related to API Security, new API vulnerabilities, industry news and product updates.
Events
Browse and register for upcoming sessions or catch up on what you missed with exclusive recordings
CVE Database
Find out everything about latest API CVE in popular products
Test Library
Discover and find tests from Akto's 100+ API Security test library. Choose your template or add a new template to start your API Security testing.
Documentation
Check out Akto's product documentation for all information related to features and how to use them.