404 Not Found
The URL you're trying to access doesn't exist on the server.
The server cannot find the requested resource.
What HTTP 404 Not Found Means
The server cannot find the requested resource.
The URL you're trying to access doesn't exist on the server.
Common Causes
- URL typo or incorrect link
- Resource deleted or moved
- Route not defined
- File doesn't exist
How to Fix It (For Visitors)
- Check URL for typos
- Use site search to find content
- Return to homepage
- Clear browser cache
How to Fix It (For Developers/Admins)
- Verify file exists on server
- Check route configuration
- Review URL rewrite rules
- Implement custom 404 page
- Check for broken links
404 vs 410 vs Soft 404
- 404 Not Found - nothing exists at this URL right now; it may come back.
- 410 Gone - the resource was removed on purpose and will not return.
- Soft 404 - a "page not found" message served with status 200. Search engines treat these as errors; always return a real 404 status for missing pages.
"Server Error in '/' Application. The resource cannot be found."
This is the ASP.NET (System.Web) error page for an HTTP 404. The Requested URL line shows the path that failed. Check that the route or controller action exists, that the file was deployed, that the IIS site or virtual directory points to the right folder, and that the URL is not missing an application path prefix. On IIS, the detailed error page also shows a sub-status such as 404.0 or 404.3 - see the IIS sub-status table.
404 Errors in API Clients
Messages such as "The HTTP status code of the response was not expected (404)" come from generated .NET API clients (for example NSwag) and "HTTPError: Not Found" from many SDKs. In both cases the server answered 404: check the base URL, API version prefix, trailing slashes, and the IDs in the path. See HTTPError exceptions explained.
Returning a 404 Not Found (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 404 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(404).json({ error: 'Not Found' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='Not Found'), 404
PHP
<?php
http_response_code(404);
header('Content-Type: application/json');
echo json_encode(['error' => 'Not Found']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 404 Not Found
Frequently Asked Questions
What does HTTP 404 Not Found mean?
The URL you're trying to access doesn't exist on the server. In short: The server cannot find the requested resource.
Is 404 Not Found a client or server error?
404 is a 4xx client-error code, so the request itself needs to change. The server is running normally and is rejecting the request as it was sent by the browser, app, or API client.
How do I fix a 404 Not Found error?
Verify file exists on server. Check route configuration. Review URL rewrite rules.
Do 404 errors hurt SEO?
A normal number of 404s for pages that really no longer exist does not hurt a site. Problems arise when important pages or internal links return 404; redirect moved pages with a 301 and fix broken internal links.
Official Specification
The 404 Not Found status code is defined in RFC 9110 Section 15.5.5.