DEV Community

Cover image for 404 Not Found: What Does It Mean?
Athreya aka Maneshwar
Athreya aka Maneshwar

Posted on

404 Not Found: What Does It Mean?

When you see a 404 Not Found error, it means the server couldn’t find the resource you requested.

This happens if the URL is incorrect, the resource has been deleted, or it never existed in the first place.

In my API example, requesting an invalid route triggers a 404 response:

app.get('*', (req: Request, res: Response) => {
    res.status(404).json({ error: "Not Found", message: "The requested resource was not found" });
});
Enter fullscreen mode Exit fullscreen mode

It’s like trying to find a page in a book that was torn out—it simply doesn’t exist!

what is 404

Run this endpoint on LiveAPI with a wrong URL to show how 404 works in action.

A 404 error means the server couldn’t find the resource you requested. It’s the web’s way of saying, 'This page doesn’t exist!

Top comments (1)

Collapse
 
kamalhinduja profile image
Kamal Hinduja

The 404 error means page not found, That's why the 404 error comes.