404 Page Best Practices That Recover Traffic Instead of Losing It
- December 27, 2025
- Technical SEO
A custom 404 page is one of the most misunderstood pieces of technical SEO. Done wrong, it quietly bleeds link equity, frustrates users into bouncing, and gets your error pages misclassified as soft 404s that pollute your index. Done right, it returns the correct status code, routes confused visitors back into your site, and signals to Google exactly what happened. Here's how to build one that does the latter.
Return a real 404 (or 410) status code
The single most common failure is a 404 page that responds with an HTTP 200 OK status. The page says "not found," but the server tells crawlers the page exists and is valid. Google calls this a soft 404, and it's a problem because it wastes crawl budget, lets dead URLs linger in the index, and dilutes the signals Google uses to understand your site structure.
Verify your status code directly rather than trusting what the browser shows you:
curl -I https://example.com/this-page-does-not-exist- The first line must read
HTTP/2 404(or410), not200.
Use 404 (Not Found) when a URL is gone but may return, or when you're unsure. Use 410 (Gone) when you've deliberately and permanently removed content and want it dropped from the index faster. Google treats 410 as a slightly stronger removal signal, but in practice the difference is marginal—don't agonize over it. The cardinal rule is simply: never serve a 200 for missing content.
JavaScript frameworks are the worst offenders here. A React or Vue single-page app often renders a "404" component client-side while the server returns 200 for every route. Fix this at the server or CDN edge: configure your hosting (or a serverless function/edge worker) to detect unknown routes and emit a genuine 404 header before the SPA ever loads. Next.js, for example, returns a proper 404 from its not-found handling when configured correctly—confirm it with curl, not the rendered page.
Avoid the soft-404 trap on thin and redirected pages
Soft 404s aren't only caused by wrong status codes. Google's algorithms also infer that a page is an error based on its content. Watch for these patterns that trigger misclassification:
- Empty category or search pages. A "0 results found" page that returns 200 looks like an error to Google. Either return a 404 for genuinely empty results, or populate the page with related products, popular categories, and a meaningful response.
- Mass redirects to the homepage. Redirecting every dead URL to
/is a classic mistake. Google detects this and treats the redirects as soft 404s, because the destination has nothing to do with the requested content. Redirect only to a genuinely equivalent page; otherwise serve a 404. - Placeholder "coming soon" pages served at scale, or out-of-stock product pages stripped of all content.
If Search Console's Pages report flags URLs as "Soft 404," that's your queue: each one is either content that should be fleshed out or a URL that should return a hard 404/410.
Design the page to retain the user
The status code keeps your index clean; the page design keeps the human on your site. A blank "Error 404" on a white background sends people straight to the back button. Build the page to recover the visit:
- Keep full site navigation and the header/footer. The visitor should be one click from anywhere. Don't strip the page down to a bare error message.
- Include a working search box. Most lost visitors were looking for something specific—give them a way to find it immediately.
- Explain plainly what happened in human language ("This page may have moved or no longer exists") and offer a clear next step.
- Link to high-value destinations: your homepage, top categories, most popular articles, or a sitemap page. For e-commerce, surface best-sellers or the relevant parent category.
- Match your brand. A 404 styled like the rest of your site reassures users they're still in the right place, not on a broken server.
One smart enhancement: use the referrer or the requested URL to offer contextual suggestions. If someone hits /blog/old-seo-guide, a small script can surface current blog posts matching "seo guide." This turns a dead end into a relevant recommendation.
Recover the equity from broken links
404s exist because something linked to a URL that no longer resolves—and links carry value. Don't let that value evaporate. Audit where your 404s come from and act on each source:
- Pull your 404 list from Search Console (Pages report → "Not found (404)") and from a crawler like Screaming Frog. Cross-reference with server logs to see which 404s actually get traffic and crawler hits.
- For URLs with inbound links or organic traffic, 301-redirect them to the most relevant live page—the actual replacement, not the homepage. This is where you recover ranking signals.
- For URLs that are genuinely dead with no equivalent, let them return a clean 404/410 and move on. Not every dead URL deserves a redirect; forcing irrelevant redirects creates the soft-404 problem above.
- Fix internal links that point to 404s. Internal 404s are entirely within your control and there's no excuse for leaving them—they waste crawl budget and frustrate users on your own site.
The discipline here: a 301 to a relevant page recovers value; a 404 keeps your index honest. Choose deliberately per URL rather than applying one blanket rule.
Configuration essentials
Wire the page up correctly at the server level:
- Apache:
ErrorDocument 404 /404.htmlin.htaccess—and make sure404.htmlitself returns a 404 status, not 200. - Nginx:
error_page 404 /404.html;with the named location serving the file at a 404 status. - Don't block the 404 page in robots.txt or noindex it aggressively—Google needs to crawl it to confirm the 404 status. The status code does the de-indexing work.
- Don't redirect the 404 page itself to another URL. The error response should resolve in place at the requested URL.
- Keep it fast and lightweight. Error pages should load quickly and shouldn't depend on heavy database queries that might themselves fail.
Common mistakes to avoid
- Serving 200 on the error page. The root cause of nearly every 404-related SEO issue. Always verify with curl or an HTTP header checker.
- Blanket-redirecting all 404s to the homepage. Triggers soft-404 classification and gives users a worse experience than an honest error page.
- Noindexing or robots-blocking 404 URLs as a "cleanup." Unnecessary and counterproductive—the 404 status already handles removal, and blocking can prevent Google from seeing it.
- A dead-end error page with no navigation, no search, and no links. Guarantees a bounce.
- Ignoring the 404 report in Search Console. It's a free, prioritized list of broken links and lost equity waiting to be reclaimed.
- Client-side-only 404s in JavaScript apps. The rendered page lies; the server header tells the truth. Fix it at the edge.
FAQ
Do 404 errors hurt my rankings? A reasonable number of 404s is completely normal—Google expects them and they don't penalize your site. What hurts is 404s on URLs that have inbound links or traffic (lost equity), soft 404s (index bloat and crawl waste), and a high volume of internal links pointing to dead pages. Quantity of legitimate 404s isn't the issue; mishandling them is.
Should I redirect or let a page 404? Redirect (301) when there's a genuinely equivalent live page. Let it 404/410 when there isn't. An irrelevant redirect is worse than a clean error.
How fast does Google drop a 404 from the index? It typically takes several crawls. A 410 can be marginally faster, but neither is instant. Don't expect overnight removal.
Want this handled properly on your site?
It is exactly the kind of work an advanced technical SEO audit covers. See how an advanced SEO audit works →
About SEO ProCheck
Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.
Work With Me
Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.








