404 Not Found
The server cannot find the requested resource. Links that lead to a 404 are often called broken or dead links.
❓ Why does this happen?
Typo in route URL, deleted database resource, or unpublished page.
✅ How to fix it
Verify the URL path, check routing configurations, and update any broken references.
Return or handle 404 in your stack
// app/api/resource/route.ts
export function GET() {
return Response.json(
{ error: "Not Found", status: 404 },
{
status: 404
}
);
}Live 404 mock endpoint
Point your app, tests, or retry logic at this free public URL to reproduce a real 404 response (CORS enabled, optional ?delay=ms up to 5000).
https://castov.com/api/mock/404404 vs similar status codes
404 means the resource is not found and may come back. 410 tells clients and search engines it was removed permanently, so it is de-indexed faster.
Some APIs return 404 instead of 403 to avoid revealing that a private resource exists (security through non-disclosure).
Frequently Asked Questions
What does HTTP Status 404 mean?
Why am I getting a 404 status code?
How do I fix a 404 Not Found error?
What is the difference between 404 Not Found and 410 Gone?
What is the difference between 404 Not Found and 403 Forbidden?
How can I test how my app handles a 404 response?
Other 4xx status codes
Browse the full HTTP status codes directory or troubleshoot terminal errors in the Error Fix Encyclopedia.