A useful 404 page does two jobs: explain that the requested address has no matching page, and give the visitor a sensible way forward. Its design and its HTTP response must agree. A polished layout served with a success status can still misrepresent a missing resource.

Start by deciding what happened to the original content. Then build the recovery experience and verify the exact missing URL. This guide covers intentional missing-page handling; if a published WordPress page unexpectedly disappeared, follow the separate permalink and routing diagnosis before treating it as deleted.
Decide whether the address is missing, moved or broken
A 404 response means the server cannot find the requested resource. It does not establish whether that absence is temporary or permanent. Check the content record, publication state and intended address rather than guessing from the error screen.
| Verified situation | Appropriate direction | Visitor outcome to check |
|---|---|---|
| The article exists at a new permanent address | Redirect the old URL to that relevant replacement | The same information remains available |
| The item has no suitable replacement | Return a missing-resource response with helpful recovery content | The absence is clear, with useful next steps |
| An existing page fails because of routing or an application problem | Repair the responsible fault | The intended page works at its approved address |
| The address was mistyped and no exact destination is known | Offer search and navigation without inventing a match | The visitor chooses the right destination |
For content deliberately removed permanently, 410 Gone communicates that stronger meaning. This is a content-lifecycle decision, not a cosmetic alternative selected to improve a score. Keep the deletion or replacement decision documented.
Keep the error status when showing a designed page
The status belongs to the request for the missing address. Sending the visitor to an ordinary page called “404” that returns 200 does not automatically achieve this. Nor does putting “Page not found” into the heading change a successful HTTP response into an error response.
Google describes an error-like page delivered with 200 as a possible soft 404. Its guidance supports clear missing-page content, consistent site navigation and an appropriate response. An existing article can also be classified this way if its important content fails to render. Investigate that separately instead of deleting a real page to match the report.
For example, a hypothetical address ending in “old-camera-guide” might return a friendly explanation and links to the photography section while retaining 404. The visitor gets help; the response still describes the original request truthfully.
Redirect only when the replacement serves the original task
A retired installation guide replaced by its current edition has a plausible destination. A removed event announcement and an unrelated service homepage do not become equivalent because both belong to the same organization.
Use permanent redirects for verified permanent moves. Record the old URL, destination and reason. Test the chain and final page, including any established redirects already involved. Redirecting every unknown address to the homepage conceals the distinction between a move and a missing resource and can leave visitors wondering where their requested information went.
Update internal links that you control to their intended current destinations. A redirect can support old bookmarks and external links, but it should not become an excuse to leave your own navigation pointing through unnecessary detours. For a deliberate address change, use the permalink-change workflow.
Offer a short explanation and a small set of useful exits
Write a direct heading such as “We could not find that page.” A short sentence can suggest checking the address or choosing another route. Avoid blaming the visitor, claiming the entire website is broken, or promising that deleted information is somewhere else when you do not know.
Provide a homepage link, a useful topic directory and working site search if your site has it. A compact group of relevant sections is usually easier to assess than a wall of recommendations. A report-a-broken-link route can help, but it should not require the visitor to submit personal information merely to keep browsing.
Descriptive link text distinguishes destinations. “Browse email setup guides” is more informative than several identical “Click here” links. Keep a clear content hierarchy and make recovery choices visible before decorative artwork. These are design recommendations, not claims that this one template establishes accessibility conformance.
A compact 404 layout, from top to bottom, could look like this:
- The normal site header and menu.
- A heading: “We could not find that page.”
- One sentence: “The address may be mistyped, or the page has moved.”
- A search field labeled “Search the site”.
- Three to five links to your main sections, written as destinations (“Email setup guides”, “Hosting comparisons”).
- A link to the homepage and, if you want reports, a “Tell us about this broken link” option that needs no personal details.
- The normal footer.
Preserve orientation, including on a small screen
Retain recognisable branding and essential navigation without overwhelming the recovery message. A cartoon, animation or oversized numeral should not push the explanation and links several screens down. Ensure a long requested address cannot force the layout wider than the viewport.
W3C's navigation guidance explains the value of descriptive headings, keyboard navigation and multiple ways to find content. Check the page with keyboard alone: focus must remain visible, menu controls usable and any search field labeled. Use the site's established accessible controls rather than creating a special, less usable error-page interaction.
Try zoom and a narrow viewport. Confirm that recovery links remain readable and that a sticky header or footer does not cover focused controls. The form labels and errors guide covers the search or reporting form's separate interaction requirements.
Edit the template your WordPress site actually uses
In a block theme, WordPress's template hierarchy looks for the 404 template and then its fallback. The Template Editor can expose a dedicated error template, depending on the active theme and your access. An ordinary published page with a similar name is a different object.
Review the selected template and any shared header or footer before editing. The Template Editor documentation explains that template changes affect the pages using that template and can override bundled theme files. Preserve the existing design and scope your edit to the error experience; do not reset unrelated templates.
Classic themes have a different file-based arrangement, including 404.php. Have the responsible maintainer implement a compatible change through the site's established workflow. Avoid pasting hosting rewrite rules or replacing the theme simply to obtain a different error layout.
Test the document response, not only the screenshot
- Choose a harmless, deliberately nonexistent path that you have confirmed is not published.
- Open it as an ordinary logged-out visitor, using the intended HTTPS hostname.
- In the browser Network panel, locate the main document request. Inspect its status, response and any redirects; a failing image request is a different result.
- Confirm that the designed explanation appears at that missing address and the response is appropriate.
- Follow each recovery link and submit a harmless search. Check that these destinations genuinely work.
- Open a real published page as a control. It must still show its content with the expected successful response.
From a terminal, the first line of curl -I https://example.com/this-page-does-not-exist/ should read HTTP/2 404 (or HTTP/1.1 404 Not Found), not 200 or a 301 to the homepage. The Chrome Network reference documents request status and header inspection. Record the tested URL, time and result; a template preview alone does not exercise public routing or cached responses.
Use reports to repair meaningful broken journeys
A missing URL is not automatically a website-wide emergency. Google's HTTP status guidance explains how its crawlers handle response classes. Keep current content and sitemaps consistent, then investigate unexpected missing pages and important links instead of manufacturing successful responses for every invented address.
Prioritize a broken link in your main menu, a recently moved guide or a campaign destination before meaningless random paths. The broken links audit shows how to find and fix those links in bulk. Compare current behavior with the report's observation date. For discovery, crawling and indexing questions, use the sitemap and indexing diagnostic guide; a corrected response does not guarantee a particular search result.
Accept the work when missing content is represented honestly, visitors can recover, real pages still work and the responsible changes are documented. Repeat the focused checks after a theme, cache or redirect change that could alter this route.