In short
A soft 404 is a page that responds 200 OK while its content says "not found", or that is empty. Google detects it, drops it from the index and reports it under "Soft 404" in Search Console. Fixing it means making every missing page return a real 404 or 410 code, every moved piece of content redirect with a 301, and every real page display content that Google sees when rendering.
Why it matters
The HTTP status code is the only reliable information a crawler receives before reading the page. A 200 on an error page tells it "this is valid content"; it then has to analyze the text to work out that it is not. Google does this, but with three consequences:
- Wasted crawling: according to Google's crawl budget guide, soft 404s keep being crawled, whereas a
404is a strong signal not to come back. - Real pages dropped: detection is based on content. A product page whose description fails to load, an empty category or a search results page with no results can be mistaken for errors and fall out of the index.
- Poorly targeted redirects: Google states in its site move guide that redirecting many old URLs to an unrelated destination, such as the homepage, can be treated as a soft 404.
Google lists as possible causes a missing server-side include file, a broken database connection, an empty internal search results page or a JavaScript file that failed to load.
What it improves
- Indexing Real pages that were mistaken for errors return to the index once their content is visible.
- Crawling Removed URLs return 404 or 410 and are crawled less and less.
- Report reliability Real errors appear under their actual name (404, 5xx) instead of being mixed together.
- Visitor experience A helpful 404 page, with navigation and search, instead of a blank page.
- Rankings No direct effect on other pages; legitimate 404s do not penalize a site.
How to check
In Search Console, open the Page indexing report and click "Soft 404". For each template that appears in the examples, inspect a URL with the URL Inspection tool and look at the screenshot and the rendered HTML.
Then test the server with an address that certainly does not exist:
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" https://example.com/page-qui-n-existe-pas-$(date +%s)
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" https://example.com/produits/produit-inexistant-$(date +%s)
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" https://example.com/blog/article-inexistant-$(date +%s)
Expected result: 404 (or 410) with no redirect, on every type of URL. A 200, or a 301 or 302 to the homepage or to /404, reveals a soft 404.
In Screaming Frog, the custom search feature (Configuration > Custom > Search) lets you list pages returning 200 that contain "not found", "does not exist" or "no results".
How to implement
Before you start
Choose the response according to the situation:
| Situation | Response |
|---|---|
| Content removed, with no equivalent | 404 or 410, with a helpful error page |
| Content moved or replaced by an equivalent page | 301 to the new URL |
| Real page wrongly reported (empty when rendered) | Fix how the content loads |
| Legitimate but thin page (empty category, search with no results) | Flesh it out, or noindex, or 404 if it has no reason to exist |
The error page itself can be well designed (clear message, menu, search, popular links): what matters is the status code. See create a helpful 404 page (opens in a new tab) and return 404/410 for removed content with no equivalent (opens in a new tab).
Apache
Versions Apache 2.4.
Declare the error page with a local path, in the virtual host or the .htaccess file:
ErrorDocument 404 /404.html
ErrorDocument 410 /410.html
# Permanently removed content
Redirect gone /ancienne-collection-2019/
RedirectMatch gone ^/promo-noel-20(1[0-9]|2[0-3])/
With a full URL (ErrorDocument 404 https://example.com/404.html), Apache sends a redirect instead of the 404 code: that is the mistake to avoid. Reload with sudo apachectl configtest && sudo systemctl reload apache2.
Nginx
Versions Nginx 1.24 and later.
server {
error_page 404 /404.html;
error_page 410 /410.html;
location = /404.html {
internal;
}
location = /ancienne-collection-2019/ {
return 410;
}
}
Two configurations create soft 404s: error_page 404 =200 /index.html;, which turns every 404 into a 200, and try_files $uri $uri/ /index.html; for a single-page application that does not handle unknown routes. For a PHP application (try_files $uri $uri/ /index.php?$args;), the application itself must return the 404. Reload with sudo nginx -t && sudo systemctl reload nginx.
IIS
Versions IIS 10 (Windows Server 2016 to 2025).
In web.config:
<configuration>
<system.webServer>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" />
<error statusCode="404" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
responseMode="ExecuteURL" serves the page while keeping the 404 code; Redirect would send a 302 redirect.
Cloudflare
Versions Cloudflare Pages and Workers with static assets (Wrangler 4), November 2026.
Cloudflare does not alter the origin's 404s. The risk comes from static hosting:
- Cloudflare Pages: without a
404.htmlfile at the project root, Pages treats the site as a single-page application and serves the root for any unknown path. Add a404.html. - Workers with static assets:
not_found_handling = "single-page-application"servesindex.htmlwith a200. For a static site, prefer this inwrangler.toml(sameassets.not_found_handlingkey inwrangler.jsonc):
[assets]
directory = "./dist/"
not_found_handling = "404-page"
Workers then serves the nearest 404.html with a 404 code. After the fix, purge the cache in Caching > Configuration.
AWS
Versions Amazon S3 and CloudFront consoles, November 2026.
S3 static website hosting: set the error document (404.html) in the bucket properties. CloudFront: under Error pages, a custom error response that maps a 403 or 404 error to /index.html with a 200 code is the usual setup for single-page applications, and a classic source of soft 404s. Keep the 404 response code, or handle unknown routes in the application.
Netlify
Versions _redirects file, all Netlify plans, November 2026.
A 404.html file at the root of the publish directory is served automatically with a 404 code. The /* /index.html 200 rule used by single-page applications returns 200 for any path: list the real routes before a final 404 rule in _redirects:
/produits/* /index.html 200
/blog/* /index.html 200
/* /404.html 404
Under /produits/*, the application still has to handle products that do not exist (see "JavaScript sites without server rendering" below).
Vercel
Versions vercel.json file, all Vercel plans, November 2026.
A static 404.html, or the framework's error page, is served with a 404 code. Avoid a global rewrite {"source": "/(.*)", "destination": "/index.html"} in vercel.json without handling unknown routes.
Shared hosting
The ErrorDocument block from the Apache section works in .htaccess. In cPanel, the Advanced > Error Pages screen edits the pages served for each code; then check with curl that the code is still 404. Some hosts offer a "redirect 404s to the homepage" option: turn it off.
WordPress
Versions WordPress 6.4 to 7.1, WooCommerce 9 and 10.
WordPress returns a real 404 for a post or page that does not exist. Soft 404s come from elsewhere:
- Plugins that redirect 404s to the homepage: turn this option off.
- Empty archives: a category or tag that exists but has no posts responds 200 with "Nothing Found". Delete or fill these terms, or return 404 while they are empty, in a child theme's
functions.phpor a plugin:
add_action('template_redirect', function (): void {
if (! (is_category() || is_tag() || is_tax())) {
return;
}
if (have_posts()) {
return;
}
global $wp_query;
$wp_query->set_404();
status_header(404);
nocache_headers();
});
- Internal search: set the results to
noindex(Yoast SEO does this by default) and do not link to them. See handle internal search results with no SEO value (opens in a new tab). - WooCommerce: a deleted product with no redirect returns 404, which is correct; redirect with a 301 to an equivalent product when one exists.
Shopify
Versions Shopify admin, all plans, November 2026.
Shopify returns a real 404 for a deleted product or collection. For replaced content, create a URL redirect: Content > Menus, the link to view URL redirects, then create a redirect. Empty collections and products without a description are common sources of soft 404s: hide an empty collection or fill it, and keep the content, price and alternatives on an out-of-stock product page. See manage temporarily out-of-stock products (opens in a new tab).
PrestaShop
Versions PrestaShop 8 and 9.
On a disabled product's page, the SEO tab offers the behavior to apply when the product is offline: no redirection (404, and 410 depending on the version) or a permanent redirect to a category or another product. Choose the 301 to a real equivalent, otherwise the 404 or the 410.
Laravel
Versions Laravel 10 to 13.
Return 404 from the code, never an error view with a 200 code:
Route::get('/produits/{product:slug}', [ProductsController::class, 'show'])->name('products.show');
public function show(Product $product): View
{
return view('products.show', ['product' => $product]);
}
Route model binding returns 404 if the slug does not exist. Elsewhere, use Product::where('slug', $slug)->firstOrFail() or abort(404), and abort(410) for withdrawn content. Customize the page in resources/views/errors/404.blade.php. Watch out for Route::fallback(): the view it returns goes out with a 200 unless you specify the code, response()->view('errors.404', [], 404).
Symfony
Versions Symfony 6.4, 7.4 and 8.x.
#[Route('/produits/{slug}', name: 'product_show')]
public function show(string $slug, ProductRepository $products): Response
{
$product = $products->findOneBy(['slug' => $slug]);
if ($product === null) {
throw $this->createNotFoundException();
}
return $this->render('product/show.html.twig', ['product' => $product]);
}
The error page is customized in templates/bundles/TwigBundle/Exception/error404.html.twig.
Next.js
Versions Next.js 15 and 16 (App Router).
With the App Router, call notFound() when the resource does not exist:
// app/produits/[slug]/page.js
import { notFound } from 'next/navigation';
export default async function Page({ params }) {
const { slug } = await params;
const product = await getProduct(slug);
if (!product) {
notFound();
}
return <ProductDetails product={product} />;
}
notFound() returns a 404 if it runs before the response starts, including during prerendering. When called in a component under <Suspense> after streaming has started, the response keeps its 200 code and Next.js adds a noindex tag: check that the resource exists before any streaming to get a real 404. Customize the display with app/not-found.js.
Nuxt
Versions Nuxt 4.
// app/pages/produits/[slug].vue, inside <script setup>
const route = useRoute();
const { data: product } = await useFetch(`/api/products/${route.params.slug}`);
if (!product.value) {
throw createError({ status: 404, statusText: 'Product not found', fatal: true });
}
With server rendering, Nuxt then returns the 404 code and the app/error.vue page. On a Nuxt 3 project, which is no longer maintained since July 2026, the files are in pages/ with error.vue at the root, and that version's documentation uses statusCode and statusMessage.
Astro
Versions Astro 5 to 7.
In static mode, src/pages/404.astro produces a 404.html that most hosts serve with a 404 code. With on-demand rendering (adapter installed, export const prerender = false in the page or output: 'server'):
---
const product = await getProduct(Astro.params.slug);
if (!product) {
return new Response(null, { status: 404 });
}
---
JavaScript sites without server rendering
A single-page application receives every URL on the same index.html. Google suggests two solutions: redirect in JavaScript to a URL for which the server returns a real 404, or add a noindex tag dynamically.
const product = await fetch(`/api/products/${id}`).then((response) => response.ok ? response.json() : null);
if (!product) {
const meta = document.createElement('meta');
meta.name = 'robots';
meta.content = 'noindex';
document.head.appendChild(meta);
}
See check SPA HTTP status codes (opens in a new tab). Server rendering, when possible, fixes the problem at its root.
Real pages wrongly reported
If the URL is a real page, open URL Inspection, then "Test live URL" and "View tested page". An empty screenshot or an error message means the content did not load for Googlebot: resources blocked in robots.txt, a failed API call, an intermittent server error, resources that are too slow or too numerous. Fix the cause, then click "Validate fix" in the report.
Common mistakes
- Redirecting every unknown URL to the homepage: Google may treat these redirects as soft 404s, and visitors are left confused. See avoid redirecting all removed pages to the homepage (opens in a new tab).
- Redirecting to
/404: the error page then responds on a URL that does not exist, after a 301 or 302. ErrorDocumentwith a full URL: Apache sends a redirect instead of the 404 code.- Single-page application fallback rules:
index.htmlwith a 200 for any path, on CloudFront, Netlify, Vercel, Cloudflare or Nginx. - Leaving categories or service pages empty: they get mistaken for errors.
- Being afraid of 404s: a 404 on content that has really been removed is the right response and does not penalize the site.
- Validating the fix without testing every template: validation fails on the template you forgot.
Frequently asked questions
What is a soft 404 error?
A soft 404 is a page that responds with HTTP code 200, a sign of success, while its content indicates an error or it is empty: "page not found", a category with no products, a search with no results. Google detects it by analyzing the content, excludes it from the index and reports it in the Search Console Page indexing report. The fix is to return a real 404 or 410 code, or to make the real content visible.
Should a removed page return 404 or 410?
Both are fine for removed content with no equivalent: they tell Google the page no longer exists, and the URL gradually drops out of the index. A 410 explicitly says the removal is permanent; a 404 says the page cannot be found. Choose 410 for deliberate, lasting removals and 404 by default. If equivalent content exists, a 301 redirect to it is better than either.
Does redirecting removed pages to the homepage prevent soft 404s?
No, quite the opposite. Google states that redirecting many old URLs to an unrelated destination, such as the homepage, can be treated as a soft 404. Visitors also land on a page that does not match what they were looking for. Only redirect with a 301 to an equivalent page; with no equivalent, return a 404 or 410 code with an error page that offers navigation and search.
Why is a real page reported as a soft 404?
Google judges a soft 404 based on the content it sees when rendering. If a product description loads through an API that fails, if a JavaScript file is blocked or if the server returns an intermittent error, Googlebot sees an empty page and takes it for an error. Test the live URL in the inspection tool and look at the screenshot: a blank page confirms a loading problem to fix.
Resources
- Search Console Help: Page indexing reportsupport.google.com
- Google Search Central: Troubleshoot crawling errorsdevelopers.google.com
- Google Search Central: HTTP status codes and Google Searchdevelopers.google.com
- Google Search Central: JavaScript SEO basicsdevelopers.google.com
- Apache: ErrorDocument directive and Nginx: error_pagehttpd.apache.org
- Cloudflare Workers: handling not-found pagesdevelopers.cloudflare.com
- Next.js: notFound and Laravel: HTTP errorsnextjs.org
Updated on
Topic checklist (PDF)