Every website eventually sends visitors to a page that doesn’t exist. A permalink changes, an old post gets deleted, or someone follows a broken link from another site. When that happens, WordPress returns a 404 error — and on most fresh installs, that means a sparse, unhelpful page that gives visitors nowhere to go.
The default behaviour is a missed opportunity. A well-built 404 page can redirect that traffic back into your site rather than losing it entirely. It takes under an hour to set up, and once it’s in place, it handles those moments quietly without any ongoing effort.
The way I approach it: treat the 404 page as part of your navigation, not as an error state. Visitors land there by accident — the job of the page is to give them a quick route back to something useful.
What Google Actually Says About 404s
This is worth stating plainly because it’s a genuinely common misconception: a 404 error is not a ranking signal, and it does not hurt your site’s SEO. Google’s John Mueller has confirmed this directly and repeatedly — returning a 404 (or 410) for a URL that genuinely doesn’t exist is, in his words, “perfectly fine with regards to SEO, even if it’s hundreds of millions of pages.” A 404 is not a quality signal. It’s simply the correct, expected answer to a request for a page that isn’t there, and Google’s crawler treats it as a completely normal part of how the web works.
What actually causes a problem is a soft 404 — a page that returns a 200 OK status (telling search engines “this page exists and loaded fine”) while showing a human visitor an empty or “not found”-style message. Soft 404s keep getting crawled the same as any real page, quietly wasting crawl budget on URLs that were never going to rank for anything. If a page genuinely no longer exists, returning a real 404 or 410 status code is the technically correct response — and, per Mueller, has no downside at all.
What a Good 404 Page Should Do
A custom 404 page doesn’t need to be elaborate. Its job is simple: acknowledge the error, explain why it might have happened, and give visitors a clear path forward. That usually means a short message, a link back to the homepage, a search bar, and links to a few key pages or categories.
What it shouldn’t do is leave visitors on a blank dead end, or redirect every 404 silently to the homepage — which confuses both visitors and search engine crawlers, and can itself create a soft-404-like pattern if done at scale. A proper 404 response with useful navigation is the right approach: correct status code, genuinely useful page.
The real cost of a bad 404 isn’t a ranking penalty — it’s the lost visitor. According to Google’s crawling documentation, a 404 response causes Google to gradually stop processing and eventually remove that specific URL from its index, which is exactly the correct outcome for a page that’s genuinely gone. The custom page you build recovers the human visitor who’s already there; it does nothing to and needs nothing from the ranking algorithm.
How to Create a Custom 404 Page in WordPress
The method depends on your theme or page builder. These are the three most common approaches.
Option 1 — Theme Builder (Recommended)
Most popular WordPress themes — including Kadence, Astra, and GeneratePress — include a dedicated template for the 404 page in their theme builder or theme customiser. This is the cleanest approach because it keeps the 404 page on-brand without any extra plugins.
- Open your theme settings or theme builder — the exact location varies by theme.
- Look for a 404 Page template option.
- Design the layout using your theme’s block editor or visual builder.
- Save and publish the template.
Option 2 — Elementor or Divi Theme Builder
If you use Elementor Pro or Divi, both include a theme builder that lets you assign a custom template to 404 errors.
In Elementor: go to Templates → Theme Builder, create a new template, and choose Error 404 from the conditions dropdown. Design the page and publish it with the condition set to display for all 404 errors.
In Divi: go to Divi → Theme Builder, add a new template, enable it for 404 Page, and build the layout in the visual editor.
Option 3 — Edit the 404.php Template File
If you’re comfortable editing theme files, you can modify the 404.php file in your theme directly. This works with any theme and gives full control over the layout. I only recommend this if you’re using a child theme — editing the parent theme file directly means your changes get overwritten on the next theme update.
Open Appearance → Theme File Editor, select your theme, and find 404.php. Add your error message, a search form using get_search_form(), and links to your main pages. Confirm the template genuinely returns a 404 HTTP status — it’s easy to build a custom page visually and accidentally end up with a soft 404 if the underlying status code isn’t set correctly, particularly with heavily customised page-builder templates.
What to Include on Your 404 Page
Whether you design it visually or in code, the content should cover these elements:
- A short, plain-language message — “Page not found” is fine. No need for humour unless it genuinely fits your brand.
- A link back to the homepage.
- A search bar — this is the single most useful element, as it lets visitors find what they were looking for without guessing.
- Links to 2–3 key sections: your main blog page, a services page, or your most-visited category.
On content-heavy sites, a short list of recent or popular posts also works well. Keep the layout clean — the goal is fast navigation, not a busy page. Use your site’s normal header and footer so visitors have the full navigation menu available.
Practical Tips
If you’ve recently changed your WordPress permalink structure, some old URLs will be generating 404 errors. The 404 page handles unexpected errors, but for known broken URLs, setting up 301 redirects in WordPress is the right fix — redirects send visitors and crawlers to the correct destination automatically, and they’re the actual mechanism that preserves any search value the old URL had built up (which a plain 404 does not do, since Google simply drops the dead URL from its index rather than transferring anything to a replacement).
Run a broken link check after any major content reorganisation. Finding and fixing broken links in WordPress covers the tools that make this quick to do, and catching internal 404s early is much easier than tracking them down after the fact.
After setting up or updating your 404 template, test it by visiting a non-existent URL on your site, and check the HTTP status code it actually returns (your browser’s developer tools Network tab shows this) rather than just how the page looks. This step takes a couple of minutes and confirms the page displays correctly, the navigation links work, and it’s a genuine 404 rather than an accidental soft 404.
Common Mistakes
Redirecting all 404s to the homepage. This seems helpful but it isn’t. Visitors arrive on the homepage without context, don’t know why they’re there, and often leave anyway. Done at scale, it can also start reading to crawlers like a soft-404 pattern rather than a set of genuinely distinct, working pages. A proper 404 response is the correct technical answer.
Leaving the WordPress default page in place. The default 404 on most themes gives visitors nothing to do. Replacing it is one of the first things worth doing on any new WordPress site — it’s a small task with an outsized impact on the visitor experience, even though (per Mueller’s comments above) it has zero direct impact on your rankings.
Stripping out the site header and footer. Some 404 templates remove the navigation to create a focused error page. The problem is that visitors who hit a 404 need navigation more than most — removing it makes the dead end worse, not better.
Building a custom page that accidentally returns a 200 status. A visually convincing “not found” page is still a soft 404 if the server reports success behind the scenes — check the actual status code, not just how the page reads.
When a Redirect Is Better Than a 404
Use a custom 404 page for unexpected errors: broken external links, mistyped URLs, or pages that no longer exist with no clear replacement.
Use a 301 redirect when a page has moved permanently to a new URL and you know where it now lives. This preserves any SEO value the original URL had built up, and it sends visitors to the right place without the interruption of an error page — it’s genuinely the only one of the two options that carries link equity forward, since (per the section above) a plain 404 simply drops the old URL rather than passing anything on.
In practice, both are part of the same workflow. Set up redirects for any URLs you know have changed, and use the 404 page as the fallback for everything else. The step-by-step guide to building a WordPress website covers how these pieces fit into setting up a site properly from the start.
Conclusion
A 404 error itself isn’t a problem — Google has said so directly, at any scale. A custom 404 page is a small part of a WordPress site, but it earns its place for the visitor, not the algorithm. Add a search bar, a few navigation links, and a plain error message, confirm it returns a genuine 404 status rather than a disguised 200, then move on. It’s one of those foundations that works quietly in the background, recovering visitors that would otherwise be lost.

Etienne Basson works with website systems, SEO-driven site architecture, and technical implementation. He writes practical guides on building, structuring, and optimizing websites for long-term growth.