Custom 404 page: what a good one does, and the soft 404 trap

Last updated

The short answer

A good 404 page turns a dead link into a way forward: it keeps your normal menu, says plainly that the page wasn't found, and offers links to your main services, a search box if you have one, and contact details. It must also send a real 404 code, not "200 OK", or Google treats it as a soft 404. Pages that moved should redirect to their new address instead.

What a good 404 page has

The soft 404 trap

Each page your server sends comes with a status code. A missing page should answer 404 Not Found (MDN). Some sites show a "not found" message but send 200 OK, which tells Google the page exists. Google then reports a soft 404 in Search Console. With a real 404, Google says it doesn't index the address and removes it if it was indexed (Google Search Central), which is exactly what should happen to a page that is gone.

When a redirect is better

See one address for each page for setting up redirects.

How to set one up

ErrorDocument 404 /not-found.html

Use a path on your own site, as above, not a full web address: a full address makes Apache redirect, and the 404 code is lost.

Finding broken links

Checklist

Questions people ask

Do 404 errors hurt my Google ranking?
Google drops pages that return 404 from its index and crawls them less, which is what should happen to pages that are gone. A few 404s are normal. What hurts is good pages returning errors, and visitors hitting dead ends.
What is a soft 404?
A page that says 'not found' but tells browsers and Google it loaded fine (code 200), or an empty page that does the same. Search Console reports these as soft 404s. A missing page should return a real 404 code.
Should I redirect all 404s to my homepage?
No. Sending every missing page to the homepage confuses visitors and Google may treat it as a soft 404. Redirect a page only to its genuine replacement; let the rest show a helpful 404 page.
What should a 404 page say?
That the page wasn't found, in plain words, followed by ways forward: your main menu, a search box if you have one, links to your main services, and how to contact you.

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. Google Search Central: How HTTP status codes affect Google Search
  2. MDN: 404 Not Found
  3. Apache HTTP Server: Custom error responses