Custom 404 page
A 404 page has one job beyond apologising: return the right status code and offer a way back. Why a 200 on a missing page is the real problem.
What it is
This check requests a path that cannot exist — a generated one, so it is not something a site could special-case — and looks at two things: the status code that comes back, and how much content came with it. A response that is not 404, or is under a couple of hundred bytes, reads as a server default rather than a page anyone designed.
The size heuristic is deliberately crude and worth naming as such: it distinguishes a bare "Not Found" from a real page, not a good 404 page from a bad one.
Why it matters
The status code is the part that has consequences beyond the visitor. A missing page that answers 200 with "nothing here" is a soft 404: search engines see a successful response, index the URL as real content, and every mistyped or dead link on the internet becomes a thin page on your site.
The design is the part that matters to the person. Someone reaching a 404 followed a link that used to work or typed something slightly wrong; a page offering search and a route back into the site keeps them, and a bare server error does not.
How to fix it
error_page 404 /404.html;
location = /404.html {
internal;
}ErrorDocument 404 /404.htmlexport default function NotFound() {
return <h1>Page not found</h1>;
}/* /404.html 404Related checks
4This is one of the 75 checks the scanner runs. See what we check for the full list, every severity weight, and how the score is computed from them.