The 404 page: the status code, and what the visitor sees

A 404 page has two audiences. Search engines read the status code and nothing else. People read the page and decide whether to leave. Most sites get the second right and the first wrong, and only the first affects the index.

By , founder of Porteur · Updated 15 September 2026 · Markdown

The status code is what search reads

When a URL does not exist, the server must say so in the response, not only in the text of the page.

$ curl -sI https://yourproduct.com/does-not-exist | head -n 1
HTTP/2 404

# Wrong, and invisible to a visitor:
HTTP/2 200
  • 404 means the server has nothing at that URL.
  • 410 means it was there and was deliberately removed.
  • 200 with an error message is a soft 404, and Google will decide for itself that the page is gone.
  • A redirect to the home page is also read as a soft 404, so the old URL is dropped and its links are wasted.

The soft 404 trap

Google reports soft 404s in the Page indexing report. They come from four patterns, and all four are yours to fix.

PatternWhat the server saysThe fix
An error screen rendered by the client200Return 404 from the server for unknown paths, then render the screen
Empty category, search or listing pages200Give them content, or noindex the empty state
A redirect from every missing page to the home page301 to a 200Redirect only to an equivalent page, otherwise return 404 or 410
A page whose data fetch failed and rendered an empty shell200Return the right status when the data is missing, and do not render an empty page

The cost is not a penalty. It is that URLs you did not choose stay in the index looking like real pages, and pages you deleted are reported as decisions you did not make.

404 or 410, and when it matters

  • 404 for anything the server does not have: typos, guessed URLs, pages that never existed.
  • 410 for pages you removed on purpose and will not bring back. It is a clearer signal and can be acted on a little faster.
  • Neither is a penalty. A site that has ever deleted a page has 404s, and that is normal.
  • Do not return 404 for a page that is temporarily down. Use 503 with a Retry-After header so crawlers come back.

The practical difference is small. The decision that matters is the one before it: does this URL have an equivalent page, or not?

When a redirect is better than a 404

SituationAnswer
The page moved to a new URL301 to the new URL, one hop
The page was merged into another that answers the same question301 to that page
A product was discontinued and a close replacement exists301 to the replacement
A product was discontinued and nothing replaces it404 or 410, with the category linked from the error page
A campaign URL that will never return410
A typo URL nobody links to404, and do nothing else

What belongs on the page a visitor sees

The status code handles search. Now handle the person, who arrived from a stale link or a typo and is one click from leaving.

  • A plain sentence saying the page is not here. No joke that delays the answer.
  • A search box, if the site has search. This is the single most useful element.
  • Links to the main sections, the same ones as the navigation.
  • Three or four popular pages, chosen from your own Search Console data rather than guessed.
  • A link to contact or support, for the person who followed a link from your own email.
  • The site's normal navigation and footer, so the page is a place rather than a dead end.

Keep the design in the site's own vocabulary. A 404 page that looks like a different website reads as a broken site rather than a missing page.

Finding the 404s that matter

  1. Export Not found from the Page indexing report

    Google lists the URLs it tried and failed to fetch. Most will be noise.

  2. Mark the ones with external links

    The Links report shows your top linked pages. A 404 with links is equity sitting in a dead end.

  3. Mark the ones that had clicks

    Filter the Performance report by page over sixteen months. A URL that used to bring people deserves a redirect.

  4. Crawl your own site for internal links to 404s

    Links inside your own pages pointing at dead URLs are the easiest fix and the most embarrassing to leave.

  5. Check the sitemap

    A sitemap listing 404s tells Google to keep fetching them. Remove them.

Everything left after those four filters is a typo nobody links to. Let it return 404 forever and spend the hour elsewhere.

Testing your 404 page

  1. Request a nonsense URL

    Ask for the headers only and read the first line. It must say 404, on the live site, not on your machine.

  2. Test a nonsense URL in every section

    Frameworks often handle the root correctly and a dynamic route incorrectly, so try /guides/nonsense and /product/nonsense too.

  3. Test with the trailing slash and in mixed case

    These take different code paths more often than anyone expects.

  4. Inspect one in Search Console

    The URL Inspection tool reports the status Google saw, which settles any argument with your own browser.

  5. Watch the Page indexing report

    Soft 404 should trend to zero. If it does not, a template is still answering 200 for missing content.

Questions

Check my site, free

Paste your URL and the free check reads your site like a crawler in about thirty seconds, including the dead links and the pages that answer when they should not.

  • Free check, no card
  • Read-only, your own accounts
  • Readable by your agent

Read next