404
Not Found
4xx Client Error

What Does HTTP 404 Not Found Mean?

HTTP 404 is the most recognizable error on the internet. It means the server is running and reachable, but the specific resource the client requested does not exist at the given URL. The server could not find a page, file, API endpoint, or any other resource matching the requested path.

A 404 does not tell you why the resource is missing. It could be a typo in the URL, a deleted page, a moved resource without a redirect, or a link that was never valid. The server makes no distinction between these cases — it simply reports that nothing exists at that address.

Importantly, 404 is different from a connection error. If you get a 404, the server itself is working fine. The issue is specifically that the URL does not correspond to any content.

Common Causes

How to Fix It

For Website Owners

For Regular Users

Code Examples

Custom 404 Page in Nginx

server { listen 443 ssl; server_name example.com; # Custom 404 page error_page 404 /404.html; location = /404.html { root /var/www/html; internal; } }

Express.js 404 Handler

// API: Return JSON 404 app.use('/api', (req, res) => { res.status(404).json({ error: 'not_found', message: `No resource found at ${req.originalUrl}`, suggestion: 'Check the API documentation at /api/docs' }); }); // Web: Render 404 page (must be the LAST route) app.use((req, res) => { res.status(404).render('404', { url: req.originalUrl, searchUrl: `/search?q=${encodeURIComponent(req.path)}` }); });

Apache .htaccess

# Custom 404 page ErrorDocument 404 /404.html # Redirect old URLs to new ones to prevent 404s Redirect 301 /old-page.html /new-page.html RedirectMatch 301 ^/blog/(\d{4})/(.*)$ /posts/$2

Detecting 404 with curl

$ curl -o /dev/null -s -w "%{http_code}" https://example.com/missing-page 404 # Get the full response $ curl -i https://example.com/missing-page HTTP/1.1 404 Not Found Content-Type: text/html Content-Length: 1245

Frequently Asked Questions

What does a 404 error mean?
A 404 error means the web server is running normally, but the specific URL you requested does not match any page or resource on the server. It is not a server outage — the server is responding. It simply cannot find anything at the address you specified. Common reasons: the page was deleted, the URL has a typo, or a link you followed is outdated.
How do I fix 404 errors on my website?
Start by finding all your 404 errors — check Google Search Console or run a crawl with Screaming Frog. For each broken URL: if the content moved, add a 301 redirect to the new URL. If the content was deleted intentionally, consider returning 410 Gone. Fix internal links that point to non-existent pages. Set up a helpful custom 404 page as a safety net. After fixing, submit a fresh sitemap.
Does a 404 error hurt SEO?
A small number of 404 errors is normal and will not hurt your rankings. However, if important pages with backlinks return 404, you lose the link equity those pages accumulated. Use 301 redirects to preserve link value. Excessive 404 errors also waste crawl budget. Google's guidance: 404s are fine for truly removed content, but use redirects when pages move to new URLs.

Related Status Codes

Related Tools