404 Not Found: fix broken pages, missing routes and soft 404s

Which 404s you can ignore, which ones cost you visitors and rankings, and how to fix a whole site or section that suddenly returns Not Found.

· 4 min read · By the Spot Downtime team

404 Not Found is the most familiar error on the web: nothing exists at this address. A few 404s are normal on any site. Lots of them, or 404s on pages that used to work, cost you visitors, search rankings and sometimes whole features.

The three kinds of 404

KindExampleWhat to do
Typos and junk/wp-admin on a site that isn't WordPress, bots guessing URLsNothing. A 404 is the right answer.
Moved or deleted pagesOld blog URLs after a redesign, a product you stopped sellingRedirect with a 301, or return 410 if it's gone for good
Broken deployEvery page or every asset 404s after a releaseTreat as an outage: roll back

When a whole site or section 404s

If everything, or everything under a path, suddenly returns 404, it's almost never content. Check in this order:

The deploy

The build output is empty or landed in the wrong folder, so the web server's root points at nothing. Compare the server's configured root with where files actually are.

Routing for single-page apps

The home page works, but reloading /dashboard gives a 404. The server looks for a file called dashboard and doesn't find one. Send unknown paths to your app's index.html:

nginx
location / {
    try_files $uri $uri/ /index.html;
}

The wrong virtual host

A domain pointing at a server that doesn't have a site configured for it gets the default site, which often answers 404 for everything. Check that DNS points where you think, and that the server has a block for this exact hostname.

DNS lookupConfirm which IP address a domain points to before digging into server config.

Case and trailing slashes

Linux file systems are case-sensitive: /About and /about are different files. Sites moved from Windows or macOS hosting hit this often.

Handling moved pages properly

  • Moved: redirect the old URL to the new one with a 301. Search engines carry the ranking over.
  • Gone for good: return 410 Gone. Search engines drop it faster than a 404.
  • Don't redirect every missing page to the home page. Search engines treat that as a “soft 404” and visitors get confused.
Redirect checkerFollow every redirect hop from an old URL and confirm it ends on the right page with a single 301.

Watch out for soft 404s

A “Page not found” message served with status 200 looks fine to monitors and search engines. Return a real 404 status on your error page, so tools can tell the difference.

Catch the important ones

You don't need an alert for every mistyped URL. You do want one when your pricing page, sign-up page or API endpoint starts returning 404. Point a monitor at the pages that matter: Spot Downtime treats a 404 as down and alerts you with the code, and a keyword check catches the soft-404 case where the status says 200 but the content is gone.

Keep reading