Real 404s: Avoid Soft 404 Pages
When someone requests a page that doesn’t exist, your server should say so: HTTP status 404 Not Found (or 410 Gone for pages removed on purpose). A friendly, branded error page is great; it just needs to come with the right status code.
A “soft 404” is a missing page that answers 200 OK, or that redirects every unknown URL to the home page. To a visitor it looks like an error; to a search engine it looks like a real page.
Why it matters
- Search engines index junk. Soft 404 pages can end up in search results, and Google reports them in Search Console as “Soft 404”.
- Crawl budget is wasted on URLs that will never have content.
- Redirecting everything home is confusing. Someone who followed a link to a specific product lands on the home page with no explanation.
- Monitoring breaks. Tools that look for broken links rely on the status code.
What we check
We request one URL that cannot exist on your site, /__pmx-404- followed by random characters,
read only the status (no page content), and follow up to two redirects.
| Result | When |
|---|---|
| Passed | the server answers 404 or 410 |
| Needs attention | it answers 200 (soft 404), or redirects to the home page |
| Info | it answers something else, such as 403 or a server error |
This is one request and counts toward our limit of 14 requests per scan.
How to fix
Keep the helpful page, change the status.
Nginx
error_page 404 /404.html;
location = /404.html { internal; }
Avoid try_files $uri /index.html; for whole sites unless the app sets its own 404 status. That is
the most common cause of soft 404s in single-page apps.
Apache
ErrorDocument 404 /404.html
Use a local path. A full URL (http://...) makes Apache send a redirect instead of a 404.
Single-page apps (React, Vue…) served from one index.html return 200 for every path. Either
render on the server and return 404 for unknown routes, or for unknown routes add
<meta name="robots" content="noindex"> client-side; the first is much better.
WordPress returns proper 404s by default. Plugins that “redirect all 404s to the home page” are the usual culprit; turn that option off and redirect only specific old URLs that have a real replacement.
A good 404 page
- says clearly that the page wasn’t found;
- keeps your normal navigation and a search box;
- links to your most useful pages;
- returns status 404.
Further reading: Google Search Central: Soft 404 errors.