---
title: "How to Create a Custom 404 Page in WordPress (3 Ways, With or Without a Plugin)"
url: https://nexterwp.com/blog/how-to-create-a-custom-404-page-in-wordpress/
date: 2026-07-21
modified: 2026-07-21
author: "Aditya Sharma"
description: "Create a custom 404 page in WordPress three ways: the block Site Editor (no plugin), a plugin, or 404.php, plus how to keep the 404 status and find broken links."
image: https://nexterwp.com/wp-content/uploads/2026/07/NATSftpO-1024x538.jpg
word_count: 2061
---

# How to Create a Custom 404 Page in WordPress (3 Ways, With or Without a Plugin)

## Key Takeaways

- Block themes edit the built-in 404 template in Appearance > Editor > Templates > 404, and WordPress keeps the correct 404 status automatically.
- Smart Custom 404 Error Page has more than 100,000 active installations and points WordPress at a normal Page you designed without creating a redirect.
- Classic themes use a 404.php file in a child theme, which gives developers full control over the missing-page layout.
- A helpful custom 404 page includes a search box, a clear button back to the homepage, and a short list of popular or recent posts.
- Rank Math’s 404 Monitor logs every URL that hits the error page, and Google Search Console reports pages it tried to crawl and could not find.

Say someone clicks an old link to one of your posts, or drops a typo into your URL bar. The page they wanted is gone, so WordPress falls back to its error page. On most themes that page is close to empty: a short line like "Oops! That page can't be found" and nothing else. There is no menu, no search, no reason to stay. So the visitor does the obvious thing and closes the tab.

A custom 404 page turns that dead end into a soft landing. You decide what people see when a URL does not exist: a link back to the homepage, a search box, a short list of your best posts, and your own branding instead of a blank apology. It is one of the smaller changes you can make in WordPress, and one of the few that quietly improves both user experience and how finished your site looks.

There are three reliable ways to build one, and two of them need no code at all. Below we walk through each route, from the block editor to a plugin to editing your theme files, then cover the step most tutorials skip: making sure your new page still behaves correctly for Google and other crawlers.

Table of Contents

## What is a 404 page, and why does the default one lose visitors?

A 404 is the HTTP status code a web server returns when someone requests a page that does not exist. The name comes from the standard "404 Not Found" response. In WordPress it fires whenever a URL does not match any published post, page, or archive, which usually means a deleted post, a changed permalink, or a simple typo.

Every WordPress theme ships with a fallback template for this moment, but the default is almost always bare. It states that nothing was found and stops there. That is a problem for three reasons:

- **Lost visitors.** A blank error page gives people no next step, so most of them leave instead of finding what they came for.- **Weaker branding.** The default page rarely matches the rest of your design, so it feels broken even when your site is fine.- **Missed navigation.** You lose the chance to guide people to your popular content, your search box, or a signup.

A custom 404 page fixes all three. Before we build one, two ground rules that every method below respects: the page should still return a genuine 404 status code (more on why in the last section), and it should not be indexed by search engines, since it is not real content.

***Also Read:** [The WordPress Site Editor: A Complete Guide to Full Site Editing](https://nexterwp.com/blog/wordpress-site-editor/) for the full block-editing workflow behind Method 1.*

## Method 1: Build a 404 template in the Site Editor (block themes, no plugin)

If your site runs a block theme, which includes the recent default themes like Twenty Twenty-Four and Twenty Twenty-Five, WordPress already gives you an editable 404 template inside the Site Editor. No plugin and no code required.

The Site Editor is only available on block themes. WordPress's own documentation lists the Templates section as the place to review "the different default layouts for the different sections on your site, as well as custom pages (search results, 404, etc)." Here is how to reach and edit it:

- From your dashboard, go to **Appearance > Editor** to open the Site Editor.- Click **Templates**, then find the template named **404** (some themes label it Page Not Found).- Click it to open it, then click the pencil icon to edit.- Rebuild the layout with blocks. A Search block, a Buttons block linking home, and a Query Loop showing recent posts are a strong starting set.- Click **Save**.

That is the whole flow. Because it is native, the page keeps the correct 404 status automatically and inherits your theme styles.

If you want more design range than the default blocks offer, [Nexter Blocks](https://nexterwp.com/nexter-blocks/), a free library of 90+ WordPress Gutenberg blocks, works inside the same Site Editor. You can drop in richer headings, buttons, icon boxes, and layout sections to make the 404 page feel designed rather than patched together.

![Editing the 404 template in the WordPress Site Editor under Appearance then Editor then Templates](https://nexterwp.com/wp-content/uploads/2026/07/Sn7z_Ztnw5kgkcJ2ksgWouuCUrLaC3rcUIRJoKQhXDHFoY9_cpIi3SGoTS_EATNrukrQaCgxV6_-Z7FhEJ6k7g-scaled.png)The WordPress Site Editor lists a 404 template you can edit visually, no plugin needed on block themes.

Classic theme users do not have the Site Editor. If **Appearance > Editor** is missing from your dashboard, skip to Method 2 or Method 3.

***Also Read:** [What Is a WordPress Block Theme?](https://nexterwp.com/blog/what-is-a-wordpress-block-theme/) to check whether your theme supports the Site Editor.*

## Method 2: Use a plugin (any theme, no code)

If you are on a classic theme, or you simply prefer not to touch templates, a plugin is the easiest path. The most established option is [Smart Custom 404 Error Page](https://wordpress.org/plugins/404page/) (formerly known as 404page), which has more than 100,000 active installations, a 4.9 star rating, and is tested up to WordPress 7.0 at the time of writing.

Its main advantage matters for SEO: it does not create a redirect. It serves your chosen page while keeping the real 404 status code, which is exactly what search engines expect. Here is the setup:

- Install and activate **Smart Custom 404 Error Page** from Plugins > Add New.- Create a normal WordPress Page and design your 404 content on it (heading, search, links, and so on).- Go to **Appearance > 404 Error Page** in your dashboard.- Select the page you just built from the dropdown, and save.

From then on, any missing URL shows your designed page while still reporting a 404. If you use a page builder, you can design that page however you like and the plugin will still serve it.

![Smart Custom 404 Error Page plugin on WordPress.org with 100,000 plus active installations](https://nexterwp.com/wp-content/uploads/2026/07/vezGHExaAL6gpwBRkoV1HM9exZgCziFYrJXDfefaxZU6lO3A6k1rdIGSAI3fyKZYs7Uw59bY1bNnEqt2Gwjjew-scaled.png)Smart Custom 404 Error Page keeps the real 404 status instead of redirecting, which is what search engines expect.

Other tools can do this too. Some SEO and landing-page plugins include a 404 or redirection module, and page builders such as the block editor with Nexter Blocks cover the design side. Pick one tool for the job rather than stacking several, since overlapping 404 handlers can conflict.

## Method 3: Edit 404.php (classic themes and developers)

For classic themes, the 404 page is controlled by a template file named 404.php in your theme folder. Editing it gives you complete control, but it means working with code, so it suits developers or anyone comfortable with a child theme.

Always make these edits in a child theme or via a code snippet, never directly in a parent theme, or your changes will be wiped on the next theme update. A minimal 404.php looks like this:

`<?php get_header(); ?>
<main>
<h1>Page not found</h1>
<p>The page you were looking for is not here. Try a search or head back home.</p>
<?php get_search_form(); ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">Return to homepage</a>
</main>
<?php get_footer(); ?>`

Save the file as 404.php inside your child theme, and WordPress will use it for every missing URL. Because it is a theme template, it returns the 404 status by default. From here you can add menus, recent posts, or anything else your theme supports.

## What to put on a custom 404 page that actually helps

The method matters less than what you place on the page. A 404 that only says "not found" in nicer fonts still sends people away. The pages that keep visitors share a few elements:

- A search box, so people can look for what they wanted directly.- A clear button back to your homepage.- A short list of popular or recent posts to pull them deeper into your site.- Your main navigation menu, so nothing feels cut off.- A line of on-brand copy, ideally with a touch of personality, so the moment feels intentional.

Keep it focused. This is a recovery page, not a landing page, so a handful of useful links beats a wall of options. If you build it in the Site Editor, [Nexter Blocks](https://nexterwp.com/nexter-blocks/) gives you the search, button, and post-grid blocks to assemble all of this in a few minutes.

![Nexter Blocks library of 90 plus WordPress Gutenberg blocks for designing a 404 template](https://nexterwp.com/wp-content/uploads/2026/07/CBK3-xb2xdSs8-slh3SZVJARq6Of12rnn5VX4Y3ce_0vHLZD_5qhVGRW0onZ4ZidIASYKXXF6GqrYpom7Hwxgg-scaled.png)Nexter Blocks adds search, button, and post-grid blocks you can use to design a helpful 404 page in the Site Editor.

***Also Read:** [How to Add Breadcrumbs in WordPress](https://nexterwp.com/blog/how-to-add-breadcrumbs-in-wordpress/) for another way to help lost visitors find their way around.*

## Keep the right status code, and monitor your 404s

This is the step that separates a 404 page that helps your SEO from one that quietly hurts it. Three things to get right.

**Return a real 404 status.** Your custom page must still send an HTTP 404 status code, not a 200 "OK". When a missing page returns 200, Google calls it a soft 404 and treats it as a low-quality signal. All three methods above preserve the 404 status by default. The usual way people break this is by using a redirect to send every missing URL to a normal page, which returns 200. Avoid that.

**Decide between a redirect and a 404.** Not every missing URL should stay a 404. If a post simply moved to a new address, the right fix is a 301 redirect to the new URL, which passes on its ranking. If the content is genuinely gone, let it 404. A dedicated [redirect plugin](https://nexterwp.com/blog/wordpress-redirect-plugins/) makes this call easy to manage at scale.

**Monitor which URLs are 404ing.** You cannot fix what you cannot see. Rank Math includes a 404 Monitor that logs every URL that hits your error page, so you can spot broken links and decide what to redirect. You can cross-check the same data in [Google Search Console](https://nexterwp.com/blog/google-search-console-wordpress/), which reports the pages it tried to crawl and could not find. Watching this list also helps protect your [crawl budget](https://nexterwp.com/blog/crawl-budget-wordpress/), since crawlers waste time on dead URLs.

![Rank Math 404 monitor showing logged URLs that returned a 404 error in WordPress](https://nexterwp.com/wp-content/uploads/2026/07/N6e3Ls23wQA9djH7KPgXfjzd4BH-08F4l2lvZ7PGGh6SSPfJLGFRsAcrZxpEmOomzXwGVzG5ApQ-S28bCX6EGg-scaled.png)Rank Math's 404 Monitor logs every missing URL so you can decide what to redirect and what to leave as a 404.

## Wrapping up

A custom 404 page is a small project with a real payoff. Block theme users can build one in the Site Editor in minutes, plugin users can point Smart Custom 404 Error Page at a page they designed, and developers can edit 404.php directly. Whichever route you take, keep the genuine 404 status, add a search box and a few useful links, and watch which URLs are failing so you can redirect the ones that matter. Do that, and a missing page becomes a second chance instead of an exit.

## Suggested Reading

- [The WordPress Site Editor: A Complete Guide to Full Site Editing](https://nexterwp.com/blog/wordpress-site-editor/)- [Best WordPress Redirect Plugins (+ How to Set Up a 301 Redirect)](https://nexterwp.com/blog/wordpress-redirect-plugins/)- [How to Put WordPress in Maintenance Mode](https://nexterwp.com/blog/how-to-put-wordpress-in-maintenance-mode/)- [How to Create a Landing Page in WordPress](https://nexterwp.com/blog/how-to-create-a-landing-page-in-wordpress/)- [Google Search Console for WordPress](https://nexterwp.com/blog/google-search-console-wordpress/)

## Frequently Asked Questions

### Does a custom 404 page help or hurt SEO?

It helps, as long as the page still returns a real 404 status code. A well-built 404 keeps visitors on your site and reduces bounce, while the correct status tells search engines the URL is genuinely missing. The only SEO risk is accidentally serving the page with a 200 status (a soft 404) or redirecting every missing URL to your homepage.

### Can I create a custom 404 page without a plugin?

Yes. If you use a block theme, edit the built-in 404 template in the Site Editor under Appearance > Editor > Templates. If you use a classic theme, edit the 404.php file in a child theme. Both routes are plugin-free.

### What is the difference between a 404 and a 301 redirect?

A 404 tells browsers and search engines that a page does not exist. A 301 redirect sends both the visitor and their request to a different, working URL and passes on most of the old page's ranking. Use a 301 when content has moved, and a 404 when it is truly gone.

### Why does my custom 404 page still show the old design?

This is usually caching. Clear your WordPress cache and your browser cache after saving the template or plugin setting. If you edited 404.php, confirm you saved it in the active theme or child theme, and that the theme is actually a classic theme, since block themes ignore 404.php in favor of the Site Editor template.

### Should a 404 page be indexed by Google?

No. A 404 page is not real content, and because it returns a 404 status, search engines will not index it by design. You do not need to add a noindex tag manually, since the status code handles it.

#### Stay updated with Helpful WordPress Tips, Insider Insights, and Exclusive Updates – Subscribe now to keep up with Everything Happening on WordPress!

Subscribe