How to Create a Custom 404 Page in WordPress (2026 Guide)

Laptop showing a custom 404 page WordPress error screen on a bright desk

Every WordPress site has a 404 page — most of them are terrible. A visitor clicks a broken link, lands on a bare “Page not found” message, and leaves. A custom 404 page in WordPress turns that dead end into a second chance: it keeps your branding, points people to a search box or your best content, and protects the traffic you worked hard to earn. In this guide, you will learn four ways to build one — Elementor Pro, a free plugin, a child-theme template, and the block editor — plus how to find the broken URLs that actually deserve a redirect.

Why a Custom 404 Page in WordPress Matters

A 404 error means the server could not find the page that was requested. It happens for ordinary reasons: you deleted a post, changed a slug, or a visitor typed a URL wrong. The default 404 page that ships with most themes does the minimum — it says the page does not exist and stops there.

That is a missed opportunity. A visitor who hits a 404 was already interested enough to click. A good custom 404 page tells them plainly what happened, gives them somewhere useful to go next, and looks like the rest of your site.

There is also an SEO angle. A 404 page itself does not hurt your rankings — Google treats a proper 404 as a normal signal. What hurts is losing visitors who arrived through a backlink to a page that no longer exists.

What to Put on a Good 404 Page

A strong 404 page has five elements:

  • A clear, friendly headline. “This page is gone” beats a cold “404 Not Found”. Keep your brand’s tone.
  • A one-line explanation. The link may be outdated or mistyped.
  • A search box. The single most useful element — many visitors know what they were looking for.
  • Links to your best content. Your homepage, your most popular posts, or your services page. Three or four links are plenty.
  • Your header and footer. If your theme header and navigation are missing, visitors have no way back.

What to leave out: a wall of text, an auto-playing video, and any redirect that sends every 404 visitor to the homepage — it hides the error instead of fixing it.

Method 1: Create a Custom 404 Page with Elementor Pro

If you already use Elementor Pro, this is the fastest route. The Theme Builder lets you design a full 404 template visually, and it handles the routing for you — no code, no extra plugin. Elementor’s own guide to creating a custom 404 page walks through the same flow if you want a second reference.

  1. Open the Theme Builder. In your dashboard, go to Templates > Theme Builder, open the Error 404 section and click Add New.
  2. Name the template. Call it something recognisable, like “404 Page”. Avoid naming the template “404” itself — it can clash with WordPress permalinks.
  3. Pick a starting point. Elementor offers ready-made 404 templates you can import and restyle, or build from a blank canvas.
  4. Design the layout. Set the section’s minimum height to 100vh so the page fills the screen, then add a Heading widget for your message, a Search Form widget, and a Button widget linking back to the homepage. A Posts widget showing your three latest articles is a good finishing touch.
  5. Publish and set the condition. Click Publish. Elementor pre-selects the display condition Include: 404 Page. Click Save & Close.
  6. Test it. Open a URL on your site that does not exist, for example yoursite.com/this-page-does-not-exist. If the old page still shows, open the template, click the arrow next to Update, and check Display Conditions.

Method 2: Use a Free 404 Plugin (No Elementor Pro Needed)

If you run Elementor Free — or no page builder at all — a dedicated plugin does the job. The 404page plugin (100,000+ active installs) lets you pick any ordinary WordPress page and use it as your 404 page.

  1. Build the page first. Create a normal page with the block editor or Elementor Free. Add your headline, a short explanation, and a search block. Publish it — but do not add it to any menu.
  2. Install the plugin. Go to Plugins > Add New, search for “404page”, install and activate it.
  3. Assign the page. Go to Appearance > 404 Error Page, open the dropdown labelled Page to be displayed as 404 page, and select the page you just built.
  4. Test it by visiting a non-existent URL, exactly as in Method 1.

One thing to check: the plugin must serve your page with a proper 404 status code. Some redirect-style plugins instead send visitors to a normal page with a 200 status, which tells Google the broken URL is a real page.

Method 3: Build a 404.php Template in Your Child Theme

If you prefer zero plugin bloat and full control, build the template in code. This belongs in a child theme — never edit your parent theme directly, or the next theme update will wipe your work.

Create a file called 404.php in your child theme folder. A solid starting point:

<?php
get_header();
?>

<main class="error-404">
    <h1>This page has moved — or never existed.</h1>
    <p>The link you followed may be outdated, or the address was typed wrong. Try searching instead:</p>

    <?php get_search_form(); ?>

    <p><a href="<?php echo esc_url( home_url( '/' ) ); ?>">Back to the homepage</a></p>
</main>

<?php
get_footer();

WordPress loads 404.php automatically whenever a requested URL matches nothing — that behaviour is built into the template hierarchy, so there is nothing to configure. The trade-off is maintenance: every design change means editing code, and non-developers on the team cannot touch it.

Method 4: Block Themes and the Site Editor

If your site runs a block theme, the Site Editor has a built-in 404 template. Go to Appearance > Editor > Templates, open the 404 template, and edit it with blocks like any other page. Add a Search block, a Heading block, and a Latest Posts block, then save — no plugin or code needed.

Find and Fix the 404s That Actually Matter

A good-looking 404 page is only half the job. The other half is finding out which missing URLs people actually hit — and fixing the ones worth saving. If you are seeing a lot of them, start by learning how to fix WordPress 404 errors.

Rank Math, which many WordPress sites already run, has a free 404 Monitor module for exactly this. If you have not set it up yet, see my Rank Math setup guide first. Turn the module on under Rank Math SEO > Dashboard (switch to Advanced Mode if you only see the short module list), then open Rank Math SEO > 404 Monitor. The log shows each missing URL and how many times it was requested.

Sort the log before you act:

  • A page that moved or was renamed — add a 301 redirect to the new URL. In the 404 Monitor, hover over the entry and click Redirect; Rank Math fills in the source URL, and you choose the destination and 301 Permanent Move.
  • A broken link on your own site — fix the link at its source; a redirect is only a backup.
  • A URL with backlinks or real visitors — redirect to the closest matching page. This is the highest-value fix on the list.
  • Junk URLs hit by bots or spammers — leave them alone. Not every 404 needs fixing.

One practical tip: run the monitor in Advanced mode only while you are investigating. It records the referring page and user agent, which tells you where the broken link lives — but the log fills up fast, so switch back to Simple mode when you are done.

Frequently Asked Questions

Does a custom 404 page help SEO?

Indirectly, yes. The page itself does not rank, but it keeps visitors on your site instead of bouncing back to Google, and the redirects you add from the 404 log preserve link value from old URLs.

Can I create a custom 404 page with Elementor Free?

Not directly — the Theme Builder’s 404 template is a Pro feature. With Elementor Free, build the page with the editor, then use the free 404page plugin to assign it.

Should I redirect all 404s to the homepage?

No. Redirect only URLs that moved or still receive traffic, and send each one to the closest matching page.

Conclusion

A custom 404 page in WordPress is a small project with an outsized payoff: fifteen minutes of work turns a dead end into a page that helps visitors, protects your traffic, and looks like it belongs on your site. Pick the method that fits your setup — Elementor Pro if you have it, a free plugin if you do not, code if you want full control — then check the 404 Monitor once a month and redirect the URLs that deserve a new home.

Want a site where the details are handled properly? Take a look at my WordPress services or get in touch — I build fast, clean WordPress sites for businesses that need their website to work as hard as they do.