A good 404 page does three things: it returns a real 404 status code, it tells the visitor plainly that the page isn't there, and it gives them somewhere useful to go next. Everything else is decoration.
Return a real 404 status
The page a visitor sees and the status code a crawler gets are two separate things, and the second one is the one that goes wrong. A page that says "not found" but answers with a 200 OK is what Google calls a soft 404. Google's help article says invalid URLs should return a proper 404 response code, and Search Console reports the others as soft 404 errors. According to Search Engine Journal's report of a talk by Google's Gary Illyes, soft 404s also still use up crawl budget.
Check yours in ten seconds. Open a URL that can't exist, such as /this-page-does-not-exist, with the Network tab of your browser's developer tools open, or run:
curl -I https://yoursite.com/this-page-does-not-exist
The first line should say 404. Single-page apps are the usual offenders, because the server answers 200 for every path and the app draws the error afterwards. The 404 page on appadswap.com returns a real 404; we checked it while writing this.
Say what happened, in one line
"The page you're after doesn't exist, or it moved." That's enough. Don't blame the visitor, and don't make the joke so big that the message gets lost. A person who clicked a broken link wants to know two things: that it is broken, and what to do now.
Give them three exits
Three links is plenty: the home page, the section most visitors are looking for, and a search box if your site has more than a few dozen pages. A long list turns a dead end into a menu, and the visitor has already shown they weren't looking for any of it.
Don't send every missing URL to the home page automatically. The visitor ends up somewhere they didn't ask for, with no sign that the link was broken, and you never learn which links are.
The 404 page isn't for search rankings. Google's help article says 404 errors generally won't affect your site's search performance when the URLs shouldn't exist. It's for the person who landed there.
Use the empty space
A visitor on a 404 page has no task left. The page is usually a message, a button and a lot of empty space, and that space is one of the few places on your site where a recommendation doesn't compete with anything.
Put a small card for another indie product there, under the exits, never above them: the way out stays the first thing the visitor sees. Mark it as sponsored. This is what AppAdSwap is for: you add a script tag where the card should go, a person reviews every app that can appear, and your own app is shown on other makers' pages in return. You choose which categories appear on your site and can block apps and keywords.
One honest limit: the network is new and small, so we have no numbers yet on how a card on a 404 page performs, and a page that few people reach won't earn much. Treat it as free use of space that is empty anyway, not as a traffic plan.
A short checklist
- The status code is
404. - One line says the page doesn't exist or has moved.
- Three links lead somewhere useful.
- The page looks like the rest of your site, with the same navigation.
- Optional: one clearly marked card in the empty space, below the exits.
When you're ready for the last step, add your app. It's free.