HTTP Status Code 404 = “Not Found”
The server could not find the requested page, file, API endpoint, or resource.
Common causes
- Wrong URL
- Deleted or moved page
- Broken links
- Incorrect API route
- Typo in filename/path
- Missing server files
- Route configuration issue Example
http id=”z3m8xa”
HTTP/1.1 404 Not Found
Examples in websites
Trying to open:
text
https://example.com/unknown-page
may return:
text
404 Page Not Found
Developer causes
Laravel
Route not defined:
php id=”v4k2nr”
Route::get(‘/home’, function () {
return view(‘home’);
});
Accessing /about returns 404.
Node.js Express
js id=”q1f7we”
app.get(‘/users’, (req, res) => {
res.send(‘Users’);
});
Accessing /products gives 404.
Apache/Nginx
- Wrong document root
- Missing rewrite rules
- Incorrect
.htaccess - File permissions issue
Fixes
For users
- Recheck the URL
- Refresh the page
- Go back to homepage
- Clear browser cache
- Contact website owner For developers
- Verify routes/endpoints
- Check file existence
- Confirm deployment paths
- Restart server
- Verify rewrite rules
- Check API versioning Laravel fixes Enable route list
bash id=”r5n2uy”
php artisan route:list
Clear route cache
bash id=”h8p4vm”
php artisan route:clear
Custom 404 page
HTML
html id=”m9d2xt”
404 – Page Not Found
The page you requested does not exist.
Related HTTP status codes
| Code | Meaning |
| — | |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 405 | Method Not Allowed |
| 410 | Gone |
| 500 | Internal Server Error |