404 Not Found

HTTP Status CodesClient (404)commonStatus Code: 404Last updated: todayTested on:Google ChromeNode.js v20 LTSJune 2026

The server cannot find the requested resource. The requested URL may be misspelled or the resource you're looking for might have been removed.

404 Not Found Quick Fix⏱️ Est. Fix Time: 3 minutes

Usually happens because:

  • The URL is misspelled or
  • The page has been moved
  • Broken links from other websites.

🔍 Quick Checklist:

Meaning

The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource. This means that the website server is communicating, but the specific page or asset you requested does not exist at that path. This is a client-side error, meaning the request has a typo or refers to an outdated resource.

Root Causes

  • The URL is misspelled or incorrect.
  • The page has been moved or deleted.
  • Broken links from other websites.
  • The resource never existed.
CauseFrequency
The URL is misspelled or⭐⭐⭐⭐⭐
The page has been moved⭐⭐⭐⭐
Broken links from other websites.⭐⭐⭐

Common Mistakes

  • Failing to redirect deleted assets (301 redirects), causing search rankings to fall.
  • Incorrect case sensitivity settings on file systems.

How to Fix

1Check the URL for typos.
2Ensure the resource exists.
3Check if the page was moved (use 301 redirect).
4Update or remove broken links.

Framework-Specific Examples

Express fallback middleware returning 404.

Express Example
app.use((req, res) => {
  res.status(404).send('Page not found');
});

Server Configuration Examples

Custom error page rendering settings.

Nginx Config
error_page 404 /404.html;
location = /404.html {
    root /usr/share/nginx/html;
}

Prevention

  • Audit logs weekly to identify broken links.
  • Setup automated redirections using redirection tables.

Frequently Asked Questions (FAQ)

Q: Can a 404 error affect my website's SEO?

Standard 404 errors do not directly lower your overall website ranking in search results. However, if important pages with high traffic or external backlinks return 404 errors, you will lose search equity. You should 301 redirect them to relevant active pages.

Q: When should I use 410 Gone instead of 404?

Use 410 Gone when a page is permanently deleted and you want search engines to drop it from their index instantly.

Q: Why does my SPA refresh return 404 on custom routes?

Standard web servers look for physical directories matching the URL path. You must configure rewrite fallbacks directing all routes to index.html.

Q: How do I declare a custom 404 in Next.js?

Create a `not-found.tsx` file inside your route directory structure. Next.js will serve it automatically upon calling the `notFound()` hook.

Still having this problem?

Didn't solve your problem?

SuggestRequest Error