Skip to content

Knowledgebase

Designing a useful WordPress 404 template

wordpress

A useful 404 page explains that a requested address was not found and helps the visitor continue. It should keep the correct not-found response while offering relevant navigation, rather than pretending the missing page exists.

01 Plan the recovery options

Use a clear heading and a short explanation without blaming the visitor. Add a route to the homepage, important sections and a search form where the site has enough content for search to help. Keep the design consistent with the rest of the website.

A custom 404 template does not replace redirects for content that genuinely moved. Maintain those redirects separately so an old article URL can reach its actual replacement.

02 Edit the template

  1. Open the Site Editor and locate or create the theme's 404 template through the supported template controls.
  2. Keep the intended header and footer, then add concise explanatory content.
  3. Insert a Search block and a small set of useful links. Avoid a large unrelated sales section that obscures the recovery task.
  4. Preview the layout at narrow and wide widths and save the template.
  5. Visit a deliberately nonexistent path such as https://example.com/not-a-real-page-test/.

03 Example: check the actual status of a missing page

From a Linux or macOS terminal, replace the hostname with your verified public site and choose a path that genuinely does not exist:

Command example
curl --silent --show-error --output /dev/null \
  --connect-timeout 3 --max-time 10 \
  --write-out '%{http_code}\n' \
  'https://example.com/not-a-real-page-test/'

This makes a normal GET request and prints its status without saving the page body. Expect 404 for this deliberately missing page. A 200 needs investigation even if the page looks like an error. A 3xx indicates a redirect; inspect its destination rather than hiding the original response with automatic redirect following. 000 indicates that no usable HTTP response code was received, so read the connection or TLS error.

Also open the same URL in a browser to inspect the design and navigation. The status check alone does not verify the visible template.

How do I verify that the 404 design still returns a 404 response?

Confirm that the custom design appears and that the server still returns an appropriate 404 status for the missing URL. A visually branded page returning a normal success response can create a misleading soft-404 situation.

Test the search form and navigation while signed out. Check that the page does not display a fixed search query or private preview link copied from an editor session.

04 Investigate unexpected behaviour

If every missing URL redirects to the homepage, review redirect plugins or server rules before editing the template again. If the default design remains, inspect which theme is active and whether a more specific application or web-server error page handles the request.

For repeated real visitor errors, collect the requested URLs and decide whether they represent moved content, broken internal links or random automated requests. Fix genuine navigation problems at their source. The 404 template is a helpful fallback, not a reason to leave known broken links throughout the website.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support