Fix soft 404 pages properly
A soft 404 returns HTTP 200 while showing missing-content copy. Google keeps it indexed and wastes crawl budget on empty templates. Find these URLs in the Page indexing report, then make missing content return a real 404 or 410 and keep 200 only for pages with genuine value.
Why this matters
Return a real 404 or 410 instead of a 200 page that says not found.
Before you start
- Site verified in Search Console
- Access to the server or framework error handling
How to apply it
Sample soft 404s from Search Console
Open the Page indexing report, filter by 'Soft 404' and export a sample. Group URLs by template: product, post, profile or search results.
Check: The exported list contains at least one URL per template that renders a missing-content state.
Return 404 or 410 from the router
When the data lookup fails, set the response status to 404 or 410 before rendering. In frameworks this is usually an explicit not-found helper, not a redirect.
Check: curl -sI your production domain/missing-page returns HTTP/1.1 404 or 410, not 200.
Keep meaningful empty states at 200 General best practice
Search result pages with no matches, empty cart states and filtered categories with zero products should stay 200 when they explain the state and offer navigation.
Check: An empty search state returns 200 and contains a link back to the category root.
Source: seo-mcp playbook · curated entry · report an error
Framework notes
nextjs-app
Call `notFound()` from `next/navigation` inside a server component or route handler; the framework then returns a 404 response using `app/not-found.tsx`.
wordpress
Call `status_header(404)` before the template renders, or use `$wp_query->set_404()`; many themes render 404 copy while returning 200.
static-html
Serve `404.html` with an actual 404 status from the host configuration (`error_page 404 /404.html` in nginx), not with a 200 rewrite.