# A Useful 404 Page Needs More Than a Helpful Message

A visitor follows an old link to a service page. Instead of an explanation, the website silently sends them to the homepage. The site appears to work, but the visitor still does not know where the service went.

A useful missing-page response has two jobs: explain the situation to a person and describe it correctly to software. A polished design cannot do the second job on its own.

This guide focuses on implementing and testing that response on a small business website. The paths and examples are illustrative, not findings from a client audit.

## 1\. Separate the message from the HTTP status

The words “Page not found” belong to the page content. The HTTP status belongs to the response sent by the server. They are separate things.

According to [MDN's 404 reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404), `404 Not Found` means that the requested resource cannot be found. You can return that status with a helpful, branded HTML page.

If the response instead says `200 OK` while the content says the page is missing, Google may classify it as a *soft 404*. Google's [crawl-error guidance](https://developers.google.com/search/docs/crawling-indexing/troubleshoot-crawling-errors) explains this mismatch. A screenshot alone cannot reveal the response status.

## 2\. Decide what actually happened to the page

Use a small decision table before changing the template or adding redirects:

| Situation | Appropriate direction |
| --- | --- |
| The address is incorrect and no page exists there | Return `404` with useful recovery links. |
| The old page has a clear, permanent replacement | Redirect to that replacement, typically with `301`. |
| The content was deliberately removed without a suitable replacement | Return `404` or `410`, according to the site's policy. |
| The service is temporarily unavailable during maintenance | Use the appropriate temporary failure response, commonly `503`, rather than pretending the content is missing. |

A [permanent redirect](https://developers.google.com/search/docs/crawling-indexing/301-redirects) should lead to a destination that preserves the purpose of the old page. For example, an old floor-restoration URL could lead to the current floor-restoration page.

Sending every unknown address to the homepage does not establish that relationship. A homepage link can be an option on the error page without becoming an automatic destination.

[MDN's 503 reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/503) covers temporary unavailability. Do not turn a maintenance problem into a missing-content rule across the site.

## 3\. Request a genuinely missing address

Choose a path that you know does not exist. Check the actual missing address, not just the template file named `404.html`.

This Bash example works in environments such as Linux, macOS or WSL with curl installed. Replace the example domain and path with your own:

```bash
curl --silent --show-error --location \
  --dump-header - --output /dev/null \
  --write-out '\nFinal status: %{http_code}\nFinal URL: %{url_effective}\n' \
  'https://example.com/this-page-should-not-exist'
```

The command makes a GET request, follows HTTP redirects, prints response headers and discards the body. Inspect the intermediate responses as well as the final status and URL. The [curl manual](https://curl.se/docs/manpage.html) documents these options.

For a genuinely missing page without a replacement, a final `200` deserves investigation. If the final URL is the homepage, inspect the redirect rule. If you see an access challenge or `403`, you have tested the access layer rather than confirmed the missing-page behaviour.

Also open the URL in a browser. In developer tools, reload the page and inspect the main document request in the Network panel. Confirm that its status matches the page you see; a failed image request is a different issue.

## 4\. Give the visitor a clear next step

The message should answer three questions: what happened, what can I do now, and how can I get help?

Here is a minimal content fragment for a hypothetical service business:

```html
<main>
  <h1>We couldn't find that page</h1>
  <p>The address may be incorrect, or the page may have moved.</p>
  <ul>
    <li><a href="/services/">Browse our services</a></li>
    <li><a href="/contact/">Contact our team</a></li>
    <li><a href="/">Go to the homepage</a></li>
  </ul>
</main>
```

Replace those example paths with verified destinations on your site. Keep the usual site identity and navigation around the fragment. Add site search only if it exists and works.

The HTML supplies the recovery content; it does **not** set the HTTP status. Configure the missing-route response in the hosting platform, server or application framework as well.

Choose recovery destinations from your actual [website structure](https://salestudia.hashnode.dev/how-to-structure-a-small-business-website-for-users-and-search-engines). A concise services overview is usually more useful here than a long list of unrelated promotions.

## 5\. Test direct entry and nested paths

A missing link clicked inside an application and the same URL opened in a fresh tab can follow different code paths. Test both.

Include a nested address such as `/services/this-page-should-not-exist`. Check that the error page's stylesheet, logo and links still work there. Relative asset paths can behave differently at different directory depths.

For a multilingual site, test missing addresses inside each language section. The recovery text and links should make sense for that visitor. Do not assume that one successful test at the root proves every language route behaves correctly.

If JavaScript displays a missing-page message after the server has already returned `200`, changing the visible heading does not repair that earlier HTTP response. Review the routing behaviour with the person responsible for the application.

## 6\. Fix the link that sent visitors there

A working 404 page does not repair a broken link in your own menu, article or campaign.

For an important missing URL, record where the link was found, whether the destination should still exist and the action required. For example, a hypothetical services menu might still contain `/floor-care-old/` after the correct page became `/floor-care/`.

Update links you control to the intended destination. Where a genuine permanent replacement exists, retain an appropriate redirect for older bookmarks and external links. Where there is no replacement, keep the missing-page response and remove obsolete internal references.

## 7\. Keep a small repeatable check

After a routing, theme or hosting change, repeat a short set of checks:

- A known live page returns its expected content successfully.
- A deliberately missing root-level address shows the recovery page with `404`.
- A deliberately missing nested address behaves correctly too.
- One known moved page reaches its intended replacement.
- Recovery links work on desktop and mobile.
- The message, styling and HTTP response agree.

Record the requested URL, expected result, observed status, final URL and date. Fill in observations after testing; do not turn an expected result into a claimed measurement.

Salestudia is a marketing agency based in Idstein, working with businesses across Germany. Our [website development services](https://www.salestudia.de/en/pages/websites-it) connect site structure, implementation and the visitor's route to an enquiry. Missing-page handling belongs in that work because an old link should still leave someone with a useful next step.
