HTTPError.net

The fastest way to diagnose, understand, and fix any HTTP status code

Any Website

How to Fix a 404 Not Found Error

Quick Fix

The most common cause of 404 errors is: The URL is mistyped or contains a broken link

Quick solution: Re-check the URL for typos, extra characters, or wrong extensions

A 404 Not Found error is usually caused by one of a handful of configuration problems. Work through the causes below in order - the first ones are the most common.

Common Causes

Step-by-Step Solutions

Solution 1: Confirm It Is Really a 404 (Visitor Steps)
  1. Re-check the URL for typos, extra characters, or wrong extensions
  2. Remove everything after the domain and navigate from the homepage
  3. Use the site's search to find the moved content
  4. Hard-refresh (Ctrl/Cmd + Shift + R) to bypass a cached redirect
  5. Try the page in a private window to rule out extensions
Solution 2: Fix Broken Links and Moved Pages (Site Owner)
  1. Find broken links with a crawler (e.g. Screaming Frog) or the indexing reports in Google Search Console and Bing Webmaster Tools
  2. Add a 301 redirect from each old URL to its new location
  3. Update internal links and your XML sitemap to the new URLs
  4. Never bulk-redirect everything to the homepage - redirect to the closest relevant page
Solution 3: Fix Server Routing and Rewrites
  1. Apache: confirm mod_rewrite is enabled and .htaccess RewriteRules are correct
  2. Nginx: check try_files $uri $uri/ /index.html; (or your framework's front controller)
  3. Single-page apps: route unknown paths to index.html so the client router handles them
  4. Verify the file exists and the path case matches exactly on Linux
Solution 4: Make 404s Helpful and Monitored
  1. Create a custom 404 page with search and links to popular content
  2. Return a real 404 status (not 200) so search engines drop dead URLs - avoid 'soft 404s'
  3. Track 404s in analytics or logs to catch new broken links early

Prevention Tips