Blog / Technical SEO /
The 404 page: small page, big job
Someone clicks a link in an old newsletter, a forum post or a social share from two years ago. The page it points to has gone. What they see next is your 404 page, and for a lot of sites that page is a grey “Not Found” message with no menu, no search and no way back.
They leave. You never hear about it.
The 404 page is the least glamorous page on a site, and one of the few that gets visited without anyone designing it. Its job is simple. Tell the visitor honestly that the page isn’t here, and help them find what they came for. Tell search engines the same thing, with the right status code.
404s are normal
First, the good news. Having 404 errors isn’t an SEO problem in itself. Pages get removed, products get discontinued, people mistype URLs, and other sites link to addresses that never existed. Google has said for years that 404s on URLs that shouldn’t exist are fine and won’t hurt the rest of your site.
What matters is:
- that missing pages return a real 404 (or 410) status code
- that pages which should exist aren’t returning 404s by accident
- that visitors who land on a 404 have somewhere to go
The status code matters more than the design
When a page doesn’t exist, the server should send a 404 status code. You can’t see it on the page, but browsers and Google can. Check it with your browser’s developer tools (Network tab) or the URL Inspection tool in Search Console. The HTTP status codes every site owner should recognise has the full list.
The common mistake is a soft 404: a page that looks like an error to a person but returns a 200 (“OK”) to Google. Google then has to guess, and Search Console flags it as “Soft 404” in the Page indexing report. That happens when:
- a custom error page is set up as a normal page and redirected to
- a theme shows a “no products found” page with a 200 status
- empty category or search pages look like errors
WordPress and Shopify both return proper 404s out of the box. Custom setups and some page builders are where soft 404s creep in.
Don’t redirect every 404 to the homepage
There are plugins that do this in one click, and it’s tempting. No more errors in Search Console! I wouldn’t do it, for three reasons:
- Visitors are confused. They clicked a link to a specific product and landed on the homepage with no explanation.
- Google often treats it as a soft 404 anyway. A redirect to an unrelated page isn’t a real replacement.
- You hide real problems. If an important page breaks, you’ll never notice, because the error disappears into the homepage.
I only redirect when there’s a genuine replacement: the new URL of a moved page, or the closest category for a discontinued product. Everything else can 404. Redirects on WordPress covers how to set them up properly.
What a good 404 page includes
Keep it short. The visitor wants to find something, not read about why it’s missing.
- A clear, human message. “Sorry, we can’t find that page” beats “Error 404: resource not located”. A touch of humour is fine if it suits your brand, but don’t overdo it.
- The normal header and menu. Many themes strip these out. Keep them, so people can navigate.
- A search box. On a store or a big blog, this is often the most useful thing on the page.
- A few helpful links. Bestselling categories, popular posts, the contact page.
- No auto-redirect after five seconds. It’s disorienting and it creates the same problems as redirecting to the homepage.
For an online store, a small row of bestsellers or top categories is worth more than a clever illustration.
Setting it up
WordPress
Your theme has a 404.php template, or a 404 template in the Site Editor if it’s a block theme. Edit it there, or let your page builder handle it if it has a 404 template feature. Some SEO and redirect plugins also let you choose a page to show, but check the status code after: it must still be 404.
Shopify
Edit the 404 template in the theme editor (choose 404 page from the page selector) or in the 404 template files. You can add sections like a featured collection. Shopify returns the correct status code.
Finding the 404s worth fixing
Not every 404 needs action. When I go through a site’s 404s, these are the ones I look at first:
- 404s with backlinks. Another site links to a dead URL. Redirect it to the best equivalent and keep that link’s value. Ahrefs’ “Best by links” report filtered to 404s, or Search Console’s links report, helps here.
- 404s from your own site. Internal links pointing to removed pages. Fix the links at the source. How to find and fix broken links on a WordPress site walks through it.
- 404s getting real traffic. In GA4, filter page views by the page title of your 404 page and look at which URLs people requested.
- 404s on pages that should exist. In Search Console’s Page indexing report, “Not found (404)” sometimes lists a page you didn’t mean to remove. Those are the urgent ones.
Everything else, like random URLs bots try or old test pages, can be left alone.
Tracking 404 visits
It’s worth knowing how many people land on your 404 page. Simple options:
- make sure the 404 page has a distinct title, like “Page not found”, and filter by it in GA4
- check your redirect plugin’s 404 log if it has one (on WordPress, some do)
Review the list monthly. If the same missing URL keeps getting visits, that’s a sign to redirect it or recreate the content.
Related reading
- How to find and fix broken links on a WordPress site
- Redirects on WordPress: 301, 302 and the mistakes I keep seeing
- The HTTP status codes every site owner should recognise
- Handling discontinued products on Shopify
Go on, type a made-up URL on your own site, something like /this-page-does-not-exist/. What do you see, and would a lost visitor know where to go next?