A missing article can display a friendly error page while the server sends HTTP 200. The heading explains the problem to a visitor, but the status says the request succeeded. Check both parts of the response before accepting a custom error page.
Suppose a fictional guide library has a static template at /errors/not-found.html. A visitor follows a broken link to /guides/paper-lantern-missing/. The intended result is a helpful page at that original address with an HTTP 404 status.
Check the address that actually failed
Start with a path you know is absent. In your browser’s Network panel, reload that address and select the main document request. Record its status and read the displayed message. A successful response containing an error page can be classified as a soft 404 by Google Search. See the Google crawler status reference.
Opening the template address directly answers a different question. A static file can return 200 on its own URL and still be served as the body of a 404 for the missing guide. Keep those two requests separate in your test notes.
Generate a local Apache error document
For an Apache site where the server handles missing pages, prepare the template and confirm that Apache permits ErrorDocument in the configuration you can edit. Use a staging site to check the change first. The directive is available in .htaccess with the appropriate FileInfo override. See the Apache ErrorDocument reference.
- Open the Htaccess Redirect Generator.
- Under Redirect type, choose Custom 404 error page.
- Enter
/errors/not-found.htmlin Path to your 404 page and select Generate Rules.
The active line in the generated draft is shown below.
ErrorDocument 404 /errors/not-found.html
The leading slash identifies a local URL path. An absolute URL in the Apache directive causes a client redirect even when it points to the same host. The generator strips a hostname from a full URL entered in this mode, so use the local path of the template you actually prepared.
Keep a recovery copy and merge only the reviewed directive into the applicable staging configuration. The tool produces configuration text. Your server or application determines the response. If a CMS supplies its own missing-page response, check the status at that layer as well.
Compare the missing request with a working one
With curl, make a GET request and print the headers while discarding the response body. Substitute your staging host and paths for the fictional examples.
curl -sS -D - -o /dev/null "https://example.com/guides/paper-lantern-missing/"
curl -sS -D - -o /dev/null "https://example.com/guides/paper-lantern/"
On Windows, use curl.exe and replace /dev/null with NUL. These commands leave redirects visible in the first response. Check the status line and any Location header. See the curl header option reference.
- For the missing guide, expect 404 with the custom message when you open the same URL in the browser.
- For the working guide, expect 200 with its normal article content.
- If you find an unexpected redirect, trace its destination and check which layer handled the request before changing another rule.
Give the error page a short explanation and a link to a useful place to continue. If the old guide has a specific replacement, review that individual move with the Apache 301 guide. For the missing path in this exercise, the final check is the helpful body and the 404 status on the same request.