How to Make a Custom 404 Page That Keeps Visitors
A visitor follows an old link to your shop or club site, lands on a bare "Not Found" message, and leaves within three seconds.

A visitor follows an old link to your shop or club site, lands on a bare "Not Found" message, and leaves within three seconds. That small moment happens hundreds of times a month on most sites, and a custom 404 page is the cheapest fix you will ever make for it.
The default error page your theme or host shows is built to say one thing: this address does not exist. A good custom 404 page says that too, then gives the visitor a clear next step. Here is how to build one in WordPress or on any small site, what to put on it, and what to leave off.
Why a custom 404 page matters more than you think
Broken addresses are not a sign that you did something wrong. They pile up naturally. A product gets discontinued, a blog post is renamed, someone types a link from memory, or another site links to you with a typo. On a site with 200 pages that has been online for five years, it is normal to see 30 to 80 different missing addresses in a month.
Each of those is a person who wanted something from you. On a plain error page, most of them hit the back button. On a well built custom 404 page with a search box and three useful links, I usually see around 30 to 40 percent of visitors click through to another page instead. For a small store, that can mean a few extra orders every month for a one hour job.
Search engines do not reward or punish you for having a nice 404 page. What they care about is that missing pages return the correct status code. That part comes later in this guide, and it is the step most people get wrong.
What to put on the page
Keep it short. A visitor on an error page is already a little annoyed, so every element should help them move on. In order of importance:
- A plain headline. "We could not find that page" works better than a joke. Clarity first.
- A search box. This is the single most used element on any 404 page I have tracked. Put it near the top.
- Three to five links. Your most visited pages, such as the shop, the contact page, and your best guide. Not twenty.
- Your normal header and footer. The visitor should feel they are still on your site, with the usual menu in place.
- A way to report the problem. A short line like "Tell us which link sent you here" with an email link helps you find bad links fast.
For a gaming community site, the links might be the latest patch notes, the beginner guide, and the forum. For a bakery, they might be the menu, opening hours, and the order form.
How to build a custom 404 page in WordPress
You have three realistic options, and the right one depends on your theme.
Block themes
If you use a block theme such as Twenty Twenty-Four, go to Appearance, then Editor, then Templates, and open the template called "Page: 404". Edit it like any other page. Add a Search block, a heading, a short paragraph, and a List block with your links. Save, and you are done. This takes about 15 minutes.
Classic themes
Older themes use a file called 404.php. Do not edit it in your main theme, because the next update will wipe your changes. Create a child theme, copy 404.php into it, and edit the copy. Use get_search_form() to add the search box and plain links for the rest. Test it on a staging copy first if you can.
Plugin route
If you would rather not touch templates, a 404 page plugin lets you pick any normal page you have written and show it as the error page. Make sure the plugin still sends a real 404 status code. Some older ones redirect to a normal page instead, which causes the problem described below.
Outside WordPress, most hosts let you set a custom error document. On Apache servers, a single line in .htaccess such as ErrorDocument 404 /404.html points to your page.
The common advice I would skip
You will often read that the smart move is to redirect every missing page to your homepage, so no visitor ever sees an error. It sounds tidy. It is a bad idea.
When every broken address quietly sends people to the homepage, two things go wrong. Visitors get confused, because they asked for a specific recipe or product and landed somewhere unrelated with no explanation. And search engines treat mass redirects to the homepage as "soft 404s", which means they ignore the redirect and you gain nothing. You also lose the signal that tells you which links are broken, because your logs show successful page loads instead of errors.
The better approach is to redirect only addresses that have a true replacement, such as an old product page pointing to its newer version, and let everything else show your custom 404 page. Our guide to setting up WordPress redirects after changing a URL covers how to do that one address at a time.
Check the status code before you call it finished
This is the step that matters for search. Your custom 404 page must still send the HTTP status 404 to browsers and search engines. If it sends 200, which means "everything is fine", search engines may index hundreds of copies of your error page.
To check, open your browser's developer tools, go to the Network tab, and visit a made up address on your site such as yoursite/this-does-not-exist. Click the first request and look at the status. It should say 404. If it says 200 or 301, fix the setup before going further.
After launch, open the Pages report in Google Search Console once a month and look at the "Not found (404)" list. Any address with real traffic or links pointing at it deserves a redirect. The rest can stay as they are. Over time, this habit stops the slow buildup described in how broken internal links pile up on long running fan wikis.
A quick launch checklist
- Headline in plain language, no jokes that hide the message.
- Search box visible without scrolling on a phone.
- No more than five links, all to pages that exist.
- Normal site header and footer.
- Status code confirmed as 404 in developer tools.
- Monthly check of the Search Console not found list on your calendar.
Frequently asked questions
Does a custom 404 page help SEO?
Not directly. Search engines do not rank you higher for a nicer error page. It helps indirectly by keeping visitors on your site and by making it easier for you to spot and fix broken links that matter.
Should I redirect all 404 errors to the homepage?
No. Search engines usually treat that as a soft 404 and ignore it, and visitors get confused. Redirect only addresses that have a real replacement page and let the rest show your custom 404 page.
How do I find which pages are returning 404 errors?
Google Search Console lists them under Pages, in the "Not found (404)" section. Many WordPress redirect plugins also keep a log of missing addresses. Check either one monthly and fix the addresses that still get visits.
More in Web Tips
Web Tips
How to Add Schema Markup to a Small Business Website
Your shop has good reviews, clear opening hours and a phone number on every page, yet Google still shows your listing as a...
Web Tips
How to Set Up a Business Email on Your Own Domain
Customers notice when a bakery with a polished website still asks them to write to sweetcrumbs1987 at a free webmail address.
Web Tips
How to Connect Google Business Profile to Your Website
A local shop can have a tidy website and still be invisible when someone nearby searches for "game store near me" or "bike...