What Causes a 404?
- Deleted page — content was removed without a redirect
- URL typo — user typed the URL incorrectly
- Changed URL structure — redesign moved pages without 301 redirects
- Broken link — another site or your own site links to a non-existent URL
- Case sensitivity — Linux servers are case-sensitive.
/About≠/about - Trailing slash inconsistency —
/pagevs/page/treated as different URLs
Hard 404 vs Soft 404
A hard 404 returns HTTP status 404 — correct. Search engines drop the URL from the index.
A soft 404 returns HTTP status 200 but displays "Page not found" content — problematic. Google sees it as a valid page with thin content and may index it, wasting crawl budget.
⚠️ Always return status 404 for not-found pages — never 200. Check your CMS and server configuration.
Custom 404 Pages
# Apache — .htaccess
ErrorDocument 404 /404.html
# Nginx
error_page 404 /404.html;
# PHP — return correct status even with custom page
<?php
http_response_code(404);
include '404.html';
?>
A good 404 page includes: clear message, search bar, links to popular pages, and navigation. Don't just show a blank page.
Fixing 404s with Redirects
# Apache .htaccess — redirect specific old URLs
Redirect 301 /old-page.html /new-page/
# Bulk redirect old .html pages to new directory structure
RewriteRule ^([^/]+)\.html$ /$1/ [R=301,L]
Use Google Search Console's Coverage report to find all 404s that Google has discovered on your site.