404 HTTP Origin: Network OSI layer 7 · Application Last updated 15 Oct 2026

HTTP 404 Not Found

The server can’t find anything at the requested URL.

Exact message you may see page not found404 Not FoundThe requested URL was not found on this server

Meaning

A 404 means the server is reachable but there is no resource at that path. It may never have existed, it moved without a redirect, or the server’s routing isn’t sending the request to your application.

For single-page apps and frameworks with “pretty URLs”, a 404 on page refresh almost always means the web server isn’t rewriting unknown paths to index.html / index.php.

Common causes

  • Typo or wrong case in the URL (paths are case-sensitive on Linux)
  • Page or file was moved/deleted without a 301 redirect
  • Missing rewrite rules — SPA/framework routes 404 on refresh
  • Wrong document root or base path (app deployed in a sub-folder)
  • API route not registered, or wrong HTTP method mapped to a different route
  • .htaccess not applied because AllowOverride None
  • Some APIs return 404 instead of 403 to hide resources you can’t access

⚡ Quick fix

  1. Double-check the exact URL, including case and trailing slash
  2. Add a fallback rewrite to index.html / index.php for SPA and framework routes
  3. Confirm the server’s document root points to the right folder
  4. For moved pages, add a 301 redirect from the old URL
  5. List your framework’s registered routes (php artisan route:list, rails routes)

Detailed fix by platform

Nginx

  1. Send unknown paths to your app:
    nginx
    location / {
        try_files $uri $uri/ /index.html;          # SPA
        # try_files $uri $uri/ /index.php?$query_string;  # PHP frameworks
    }

Apache

  1. Enable mod_rewrite (sudo a2enmod rewrite) and set AllowOverride All for the directory.
  2. Front-controller fallback in .htaccess:
    apache
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^ index.php [L,QSA]

React

  1. With React Router, configure the host to serve index.html for all routes (Netlify _redirects: /* /index.html 200; Vercel rewrites).
  2. If deployed under a sub-path, set basename on the router and homepage/base in the build config.

WordPress

  1. Re-save Settings → Permalinks to regenerate rewrite rules.
  2. Check that .htaccess is writable and mod_rewrite is enabled.

Code examples

Check how the server sees the path

bash
curl -I https://example.com/dashboard
curl -I https://example.com/Dashboard   # case matters on Linux

How to diagnose

  1. URL — Exact path, case, trailing slash, sub-folder?
  2. Static file — Does the file exist under the document root?
  3. Routing — Does the web server rewrite to the app front controller?
  4. App routes — Is the route registered for this method?
  5. History — Was the page moved? Add a 301.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

1019 — Cloudflare Error 1019: Compute server error (Workers) (Cloudflare)1019200 — HTTP 200 OK (but something is still wrong) (HTTP)200300 — HTTP 300 Multiple Choices (HTTP)300301 — HTTP 301 Moved Permanently (HTTP)301403 — HTTP 403 Forbidden (HTTP)403404 — Soft 404: page returns 200 for missing content (HTTP)404404 — 404 on JS/CSS assets after a new deploy (HTTP)404404 — 404 only with or without a trailing slash (HTTP)404404

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.