The best 404 page examples do three things: they say plainly that the page is missing, they keep the site's normal header, navigation and search, and they give shoppers an obvious next step, such as popular collections or a search box.
In the one controlled test of a 404 page in our database, a Shopify store that added its best-selling collections to a plain 404 page saw 6.8% more conversions, though revenue per visitor barely moved.
That last detail matters. A 404 page is a small, low-traffic surface, so treat it as a quick fix rather than a growth lever.
Below are the practices that hold up, the ecommerce patterns worth copying, and what the test results actually say.
404 page best practices
Most of the rules come from two places: the HTTP spec and Google's own guidance.
The rest comes from treating the 404 page like any other page where a shopper might leave.
1. Return a real 404 (or 410) status code
The page people see and the status code the server sends are separate things.
RFC 9110, the HTTP standard, defines 404 as the server not finding "a current representation for the target resource," and says 410 (Gone) is preferred when the server knows the removal is permanent.
If your friendly "not found" page returns a 200 success code instead, Google calls that a soft 404 and flags it in Search Console.
Google's HTTP status documentation states that it doesn't index URLs returning a 4xx code and removes already-indexed ones, and that, unlike 429 and 5xx server errors, other 4xx codes don't make its crawlers slow down crawling of the site.
So a correct 404 doesn't hurt the rest of your site in search; it just drops that one dead URL.
2. Say what happened in one plain line
Google's guidance for custom error pages is to tell visitors clearly that the page can't be found.
A headline like "We couldn't find that page" beats a joke the shopper has to decode.
A light touch of brand voice is fine, as long as the message and the way out come first.
3. Keep the full site header, navigation and search
Google also recommends that the 404 page have the same look and feel as the rest of the site, including navigation.
Many themes strip the 404 template down to a logo and a "back to home" button, which removes the tools a lost shopper needs most.
Search is the obvious candidate to put front and center, since the visitor was looking for something specific.
Our database has no test of search on a 404 page, but site-wide tests show how much visible search can matter.
Blend Commerce found that showing the search bar by default on mobile, instead of hiding it behind an icon, lifted conversion rate 22% for Titan Casket and 88% for Aeromotive.
Adding a search bar to a site that had none lifted conversion rate 9% for Jackson's, with returning visitors up 28%.
4. Offer a short list of likely destinations
A dead end works better with a few strong exits than with a wall of links.
Popular collections, best sellers, or the top categories in your menu give shoppers a fresh trail to follow, which is the idea behind information scent.
Keep the list short. Five to eight links or tiles is enough to cover your main categories without turning the page into a sitemap.
5. Don't send every dead URL to the homepage
Redirecting all missing pages to the homepage looks tidy, but it isn't what Google's soft 404 guidance recommends.
It says to use a 301 redirect when a page has moved or has a clear replacement, and to return a 404 or 410 when there is no replacement.
The same logic helps shoppers. Someone who clicked an old link to a specific jacket and lands on a generic homepage has lost their context with no explanation.
6. Track 404 hits and fix the sources
The best 404 page is one fewer people see.
Pull a list of URLs that hit your 404 template, sort by traffic, and redirect the ones with an obvious replacement.
In GA4 you can usually filter page reports by your 404 page title.
Look especially for broken links in your own emails, ads and menus.
Those send paid or warm traffic to the error page, and they are entirely in your control.
| Situation | What to return | What the shopper sees |
|---|---|---|
| Product renamed or moved | 301 redirect to the new URL | The product |
| Product replaced by a newer version | 301 redirect to the replacement | The replacement product |
| Product discontinued, no close match | 404 or 410 | Custom 404 page with search and popular collections |
| Typo or mangled URL | 404 | Custom 404 page |
| Temporarily out of stock | Keep the page live (200) | Product page with a back-in-stock option |
The last row is a common mistake. An out-of-stock product is not a missing page, and taking it down throws away its traffic.
Our page on wishlists and back-in-stock alerts covers what to show instead.
Ecommerce 404 page: what to put on it and what testing shows
For a store, the 404 page has one job: get the shopper back into the catalog before they close the tab.
Here are the patterns most often seen on ecommerce 404 pages, and how much evidence stands behind each.
Example 1: best-selling collections (tested)
This is the only 404 page test in our database, and it's a useful one.
Clean Commit ran it on an anonymized Shopify store, comparing a plain 404 error page against one that listed the store's most popular collections as a way back into the catalog.
Across 140,427 visitors, the variant had a 97.3% probability of beating the control.
Conversion rate rose 6.8% and orders rose 7.1%.
But average order value fell 6.0%, so revenue per visitor rose only 0.3%.
Two lessons come out of that result. First, putting products in front of lost shoppers does pull more of them into buying.
Second, the people it recovers may buy smaller baskets, so judge a 404 test on revenue per visitor, not conversion rate alone.
The same idea works on other pages. Blend Commerce added a Best Sellers module to BBQ Land's homepage, which previously showed no products, and saw conversion rate up 15.86% and revenue per visitor up 14.09%.
Dave Diederen reported $488,000 in extra yearly revenue from adding a Best Sellers section to the bottom of a product page.
These are not 404 tests, but they show that a best-sellers block is a reliable way back into a catalog. See more in our bestseller tests.
Example 2: search bar first, with suggestions
A large search field at the top of the 404 page, ideally prefilled with words parsed from the broken URL, gives the shopper a direct way to finish what they started.
A URL like /products/blue-linen-shirt-xl still tells you what they wanted.
Be careful about what you bolt on. When Blend Commerce showed trending searches and product suggestions as soon as Fragrance Hub's search bar opened, the result was +1.92% revenue per visitor, not significant, with conversion rate down 1.33%.
Making search visible has strong evidence; extra search features are less proven.
Our site search guide and filters and search tests go deeper.
Example 3: the closest match
For discontinued products, the most helpful 404 page points to the nearest substitute: the same category, the successor model, or products with a similar name.
If you know the replacement, a 301 redirect is usually better than a 404 page at all.
This is closely related to keeping context. Blend Commerce added a "Back to Results" link on Stone Creek Coffee's product pages and found +5% revenue per visitor on mobile, but desktop conversion rate fell 5%, so the store shipped it on mobile only.
Small navigation aids can help, and they can also split by device.
Example 4: the branded joke page
Illustrations, puns and mini games are the most shared 404 page examples, and they are fine for brand character.
We have no test evidence that they help sales.
If you use one, keep the header, search and category links on the same page so the joke doesn't become the only thing to click.
Setting it up on Shopify
On Shopify, the error page comes from the theme's 404 template (templates/404.json), which can hold sections like any other JSON template.
That means you can add a collection list, featured products or a search block in the theme editor without custom code.
For redirects, Shopify's URL redirect tool supports CSV import and allows up to 100,000 redirects, or 20,000,000 on Plus.
That's plenty to map old product URLs after a catalog cleanup or replatform.
Should you A/B test your 404 page?
Only if it gets real traffic. The Clean Commit test needed 140,427 visitors to reach a 97.3% probability, and most stores send far fewer people to their error page.
For a small store, ship the basics above, then spend testing time on collection pages, menus and product pages.
If you do test, measure revenue per visitor and orders, segment by device, and check where 404 traffic comes from first.
Fixing one broken email link can do more than any layout change.
For more ideas, browse all tests in the database or start from the wider CRO hub.