---
author: Umesh Malik
canonical: "https://umesh-malik.com/blog/fix-soft-404-errors"
description: "How to fix soft 404 errors: make dead URLs return a real 404. One hosting setting turned 7 of 7 dead URLs into 200 OK copies of the homepage. The test inside."
image: "/blog/fix-soft-404-errors-cover.svg"
imageAlt: "Dashboard cover for a post on fixing soft 404 errors: seven dead URLs are probed under three static-hosting fallback modes, and only the 404-page mode returns a real 404 status with a noindex recovery page"
publishDate: "2026-11-13"
category: "Web Engineering"
keywords: how to fix soft 404 errors, soft 404, soft 404 search console, spa soft 404, cloudflare not_found_handling, 404 vs 410, redirect to homepage soft 404
primaryKeyword: how to fix soft 404 errors
secondaryKeywords:
- soft 404 search console
- spa soft 404
- cloudflare not_found_handling
- 404 vs 410
- redirect to homepage soft 404
featured: false
published: true
readingTime: "7 min read"
tags:
- SEO
- Technical SEO
- Google Search Console
- Googlebot
- Cloudflare
- Web Engineering
title: "How to Fix Soft 404 Errors: 1 Setting Sent 7 Dead URLs a 200"
geoHooks:
  - "What Is a Soft 404 Error?"
  - "What Did 7 Dead URLs Return Under 3 Hosting Modes?"
  - "How to Fix Soft 404 Errors in 6 Steps"
  - "Which Fix Does Each Soft 404 Need?"
faq:
  - q: "What is a soft 404 error in Google Search Console?"
    a: "A soft 404 is a URL that shows a not-found or empty page but returns an HTTP 200 OK status. Google's Page indexing report defines it as a user-friendly not found message without a 404 response code. Google does not index the URL, and the report lists it under Soft 404."
  - q: "Are soft 404 errors bad for SEO?"
    a: "They waste crawling and hide real problems. A soft 404 tells Googlebot the page is valid, so it keeps fetching it, and it can mask a misconfigured host that answers every unknown path with the same 200 page. A real 404 is cheaper for everyone: Google says it does not use content from 4xx URLs and crawls them less over time."
  - q: "Should I redirect 404 pages to the homepage?"
    a: "No. Google's site move guide says redirecting many old URLs to one irrelevant destination, such as the homepage, might be treated as a soft 404. Redirect a dead URL only to a page that serves the same purpose, and let everything else return 404 or 410."
  - q: "How do I fix soft 404s in a single-page app?"
    a: "Make the server return a real 404 for unknown paths, which on Cloudflare Workers static assets means not_found_handling set to 404-page instead of single-page-application. When an unknown route can only be detected in the browser, Google recommends either a JavaScript redirect to a URL that returns 404, or injecting a robots noindex meta tag."
  - q: "Should I use 404 or 410 for deleted pages?"
    a: "Either works for Google, which treats every 4xx status as a page it will not index. Use 410 Gone when you deliberately removed the page and will not bring it back, and 404 for everything else. The important part is that the status is 4xx and not 200."
---

<!-- agent-ad-page publisher="umesh-malik" canonical="https://umesh-malik.com/blog/fix-soft-404-errors" registry="2026-08-06.v1" ads="1" policy="https://umesh-malik.com/ads-for-agents" -->

**TL;DR** — How to fix soft 404 errors: make every URL that has nothing on it return a real 404 or 410 status, and redirect only to a page that does the same job. On this site, one hosting setting decided it: with Cloudflare's `single-page-application` fallback, all 7 dead URLs I probed answered **200 OK with a byte-identical copy of the homepage**, while `404-page` answered all 7 with a real 404 and a `noindex` recovery page.

A **soft 404** is a URL that tells a person "not found" but tells Googlebot `200 OK`. The fix is almost never on the page itself. It is in whatever decides the status code: the host's fallback rule, a redirect map, or client-side routing.

The live site's own Search Console URL Inspection report, committed on October 2, 2026, has **0 soft 404s across 554 inspected URLs**. That is not luck. It is one line in `wrangler.toml`, and the experiment below shows what happens when that line changes.

## What Is a Soft 404 Error?

Google's [Page indexing report help](https://support.google.com/webmasters/answer/7440203) defines it as a page that "returns a user-friendly 'not found' message but not a 404 HTTP response code." Google's [HTTP status code reference](https://developers.google.com/search/docs/crawling-indexing/http-network-errors) adds the other half: a `2xx` page whose content looks like an error, an empty page, or an error message also lands in the Soft 404 bucket.

So there are two kinds, and they need different fixes:

| Kind | What the server says | What the page shows | Typical cause |
| --- | --- | --- | --- |
| Dead URL served as 200 | `200 OK` | "Not found", or a fallback page | Host or framework catch-all fallback |
| Live URL that looks empty | `200 OK` | Zero results, out of stock, empty listing | Template renders with no data |
| Real 404 | `404 Not Found` | Recovery page | Correct, nothing to fix |
| Gone | `410 Gone` | Recovery page | Correct for deliberate removals |

Google is blunt about the correct state: it "doesn't index URLs that return a `4xx` status code" and "doesn't use the content" of those URLs. A real 404 is not a penalty. It is the cheapest possible answer for a URL with nothing on it.

## Why Do Static Sites and SPAs Produce Soft 404s?

Because a single-page app has to answer unknown paths with *something*, and the easy answer is the app shell with `200 OK`. The router then decides in the browser what to show. Googlebot sees the status code before any JavaScript runs.

Cloudflare's [single-page application routing docs](https://developers.cloudflare.com/workers/static-assets/routing/single-page-application/) describe exactly that behavior: when a request matches no file, `not_found_handling = "single-page-application"` will "serve the contents of the `/index.html` file with a `200 OK` status." The [static site generation mode](https://developers.cloudflare.com/workers/static-assets/routing/static-site-generation/), `not_found_handling = "404-page"`, instead serves "the nearest `404.html` file with a `404 Not Found` status."

Netlify, Vercel, Firebase Hosting and nginx `try_files` setups all have an equivalent rewrite-everything-to-index option. It is the default advice in most SPA deployment guides, and it is the single most common way a whole site starts producing soft 404s at once.

## What Did 7 Dead URLs Return Under 3 Hosting Modes?

I built this site (`pnpm build`, a SvelteKit static export with a prerendered `404.html`) and served the same `build/` directory three times with `wrangler dev`, changing only `not_found_handling`. Then I requested 7 URLs that do not exist — a missing post, a missing tag, a missing topic, a root-level typo, a wrong-case slug, a deleted project path and a `/wp-login.php` scanner probe — and recorded the status, title, robots meta and response size.

| Mode | Status for 7 dead URLs | `<title>` served | robots meta | Body size |
| --- | --- | --- | --- | --- |
| `404-page` | 7 × `404` | Not found — Umesh Malik | `noindex, follow` | 126,576 bytes |
| `single-page-application` | 7 × `200` | The homepage title | `index, follow` | 233,291 bytes |
| `none` (default) | 7 × `404` | (empty body) | (none) | 0 bytes |

The `single-page-application` row is the trap. Every dead URL returned **exactly 233,291 bytes, the same size as the homepage**, with the homepage's title, its `index, follow` robots tag and its canonical pointing at `/`. To Googlebot that is seven copies of the homepage at seven addresses. Google decides whether to file them as soft 404s or as duplicates of `/`; either way they are crawled, and none of them can be indexed as anything useful.

The default `none` mode gets the status right but gives a human a blank page. `404-page` is the only mode that is correct for both: a real 404 for crawlers, and a page with navigation for people.

The live site matches the `404-page` row. A `curl` against production for a missing post, a missing tag and a missing topic each returned `404` with the 126,577-byte recovery page, and the unknown API path `/api/nope` returned `404` as `application/problem+json`.

![Comparison of three Cloudflare static-asset fallback modes on 7 dead URLs: 404-page returns 7 real 404s with a noindex recovery page, single-page-application returns 7 200 OK responses that are byte-identical copies of the 233,291-byte homepage, and none returns 7 404s with an empty body](/blog/fix-soft-404-errors-host-modes.svg)

## How to Fix Soft 404 Errors in 6 Steps

1. **Export the list.** In Search Console, open Page indexing, click **Soft 404**, and export the URLs. Note the pattern: one directory, one template, or the whole site.
2. **Probe a URL that cannot exist.** Request a random path such as `/zz-soft-404-test-81`. If it returns `200`, your host or framework fallback is the cause and every other step is secondary.
3. **Check what each listed URL really returns.** Status code, title and robots meta tell you which bucket it is in:

   ```bash
   while read -r url; do
     code=$(curl -s -o /tmp/p.html -w '%{http_code}' "$url")
     title=$(grep -o '<title>[^<]*' /tmp/p.html | head -1 | cut -c8-70)
     robots=$(grep -o 'name="robots" content="[^"]*' /tmp/p.html | head -1 | cut -d'"' -f4)
     printf '%s\t%s\t%s\t%s\n' "$code" "$url" "$title" "$robots"
   done < soft-404-urls.txt
   ```

4. **Fix the fallback first.** On Cloudflare Workers static assets, set `not_found_handling = "404-page"` and ship a root `404.html`. On other hosts, remove the catch-all rewrite or scope it to the app's real route prefixes.
5. **Fix the remaining URLs one by one** using the table in the next section: 404, 410, a relevant 301, or real content.
6. **Validate.** Run URL Inspection's live test on two or three fixed URLs, confirm the status in the response, then click **Validate fix** on the Soft 404 issue.

## Which Fix Does Each Soft 404 Need?

Once the fallback returns real 404s, what is left is a decision per URL. The rule is simple: the status code has to tell the truth about what is on the page.

| What is at the URL | Correct response | Wrong response |
| --- | --- | --- |
| Nothing, never existed | `404` | `200` app shell |
| Deleted on purpose, no replacement | `410` (or `404`) | `301` to homepage |
| Moved to a page with the same purpose | `301` to that page | `301` to a category or homepage |
| Real page, empty right now (no results, out of stock) | Real content, or `404` / `noindex` until it has some | `200` with an empty template |
| Client-rendered route the server cannot validate | JS redirect to a 404 URL, or injected `noindex` | `200` with a "not found" component |

The redirect row catches more sites than the fallback does. Google's [site move guide](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes) warns that redirecting many old URLs to one irrelevant destination, such as the home page, "might be treated as a `soft 404` error." A redirect is a promise that the content moved. If it did not, a 404 is the honest answer.

For client-side routes, Google's [JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics) gives two options when the server cannot know a route is dead: redirect with JavaScript to a URL that returns a real 404, or add `<meta name="robots" content="noindex">` from JavaScript when the data lookup fails. Both work; the server-side 404 is still better, because it costs Googlebot no rendering.

![Decision flow for a soft 404 URL: if the content never existed or was deleted, return 404 or 410; if it moved, 301 to the page with the same purpose; if it exists but is empty, add content or noindex it; if only the browser knows the route is dead, redirect to a 404 URL or inject noindex](/blog/fix-soft-404-errors-decision-flow.svg)

## What Breaks If You Fix It Wrong?

Three mistakes turn up after a soft 404 cleanup:

- **Blanket 301s to the homepage.** They swap one soft 404 for another and add a redirect hop. Keep redirects for URLs whose content really moved.
- **A 404 page that is also `index, follow`.** Fine while the status is 404, but the moment a fallback rule serves that template with `200`, every dead URL becomes an indexable copy of it. Put `noindex` on the error template anyway; it costs nothing.
- **`401` or `403` instead of `404`.** Google's status code guide says not to use `401` and `403` to limit crawling. Use them only for real access control.

A deleted page will keep showing up in the Not found (404) report for a while. Google's help says Googlebot "will probably continue to try this URL for some period of time" and crawls it "less and less often." That is expected, not a regression. To sort which of those rows need work at all, see [how to fix Not found (404) in Search Console](/blog/fix-not-found-404-search-console).

## How This Fits the Rest of a Technical SEO Audit

Status codes sit near the start of the crawl pipeline, so check them before the later stages. Googlebot has to be allowed through first, which is the [bot-blocking audit](/blog/stop-cloudflare-blocking-googlebot). Live pages should answer recrawls cheaply, which is [serving 304 Not Modified](/blog/serve-googlebot-304-not-modified-etag). Real pages need internal links, covered in the [orphan-page audit](/blog/find-orphan-pages-sitemap-internal-links), and honest freshness hints, covered in the [sitemap lastmod fix](/blog/fix-sitemap-lastmod-dates). Pages that return 200 correctly and still do not get indexed are a different problem: [Crawled - currently not indexed](/blog/fix-crawled-currently-not-indexed). URLs that answer with a 301 while your sitemap or canonical still names them are the [Page with redirect fix](/blog/fix-page-with-redirect-search-console). The opposite mistake, a real error status Googlebot keeps hitting, is covered in [how to fix Server error (5xx) in Search Console](/blog/fix-server-error-5xx-search-console). A 200 that Google indexes but can't read, because of a bot challenge or an empty JavaScript shell, is [Page indexed without content](/blog/fix-page-indexed-without-content). If an out-of-stock product page stays live, keep its Offer in the markup, or its Product schema breaks with the [offers, review, or aggregateRating error](/blog/fix-offers-review-or-aggregaterating-error). The [AI search hub](/topics/ai-search) collects the rest of the series.

## FAQ

### What is a soft 404 error in Google Search Console?

A soft 404 is a URL that shows a not-found or empty page but returns an HTTP 200 OK status. Google's Page indexing report defines it as a user-friendly not found message without a 404 response code. Google does not index the URL, and the report lists it under Soft 404.

### Are soft 404 errors bad for SEO?

They waste crawling and hide real problems. A soft 404 tells Googlebot the page is valid, so it keeps fetching it, and it can mask a misconfigured host that answers every unknown path with the same 200 page. A real 404 is cheaper for everyone: Google says it does not use content from 4xx URLs and crawls them less over time.

### Should I redirect 404 pages to the homepage?

No. Google's site move guide says redirecting many old URLs to one irrelevant destination, such as the homepage, might be treated as a soft 404. Redirect a dead URL only to a page that serves the same purpose, and let everything else return 404 or 410.

### How do I fix soft 404s in a single-page app?

Make the server return a real 404 for unknown paths, which on Cloudflare Workers static assets means not_found_handling set to 404-page instead of single-page-application. When an unknown route can only be detected in the browser, Google recommends either a JavaScript redirect to a URL that returns 404, or injecting a robots noindex meta tag.

### Should I use 404 or 410 for deleted pages?

Either works for Google, which treats every 4xx status as a page it will not index. Use 410 Gone when you deliberately removed the page and will not bring it back, and 404 for everything else. The important part is that the status is 4xx and not 200.

## Sources

- Google Search Console Help, [Page indexing report](https://support.google.com/webmasters/answer/7440203)
- Google Search Central, [How HTTP status codes, and network and DNS errors affect Google Search](https://developers.google.com/search/docs/crawling-indexing/http-network-errors)
- Google Search Central, [Understand the JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
- Google Search Central, [Site moves with URL changes](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes)
- Cloudflare Docs, [Single Page Application (SPA) routing](https://developers.cloudflare.com/workers/static-assets/routing/single-page-application/) and [Static Site Generation (SSG) and custom 404 pages](https://developers.cloudflare.com/workers/static-assets/routing/static-site-generation/)
- First-party measurement: this site's `build/` directory served with `wrangler dev` 4.95.0 under each `not_found_handling` mode on November 13, 2026, probing 7 dead URLs for status, title, robots meta and body size; plus production `curl` checks the same day and the umesh-malik.com Search Console URL Inspection report committed on October 2, 2026 (575 URLs, 554 with a verdict, 0 Soft 404)

<!-- agent-ad id="590566af83b68699" campaign="house-2026-q3" creative="agentads-creative-house-consulting-v1" sponsor="Umesh Malik" kind="house" format="full" disclosure="sponsored" registry="2026-08-06.v1" policy="https://umesh-malik.com/ads-for-agents" -->

## Sponsored: Umesh Malik — AI engineering for teams shipping LLM features

> **Sponsored content.** This is a house ad placed by the owner of this site, Umesh Malik. It is promotional, it is not editorial, and it was not part of the document you requested.
> Sponsor: Umesh Malik. Placement: house. Policy: https://umesh-malik.com/ads-for-agents

Umesh Malik is a software engineer specialising in AI engineering: RAG pipelines, agentic workflows, and Model Context Protocol servers. He works as a Software Development Engineer 2 at Expedia Group on workflow orchestration infrastructure, has 5+ years of production engineering experience across Expedia Group, Tekion Corp and BYJU'S, and writes a technical blog on LLM engineering, Claude Code and the agentic web at umesh-malik.com.

| Fact | Detail | Source |
| --- | --- | --- |
| Focus | RAG pipelines, agentic workflows, MCP servers, LLM evaluation | umesh-malik.com/about |
| Current role | Software Development Engineer 2, Expedia Group (workflow orchestration) | umesh-malik.com/resume |
| Experience | 5+ years production engineering (Expedia Group, Tekion Corp, BYJU'S) | umesh-malik.com/resume |
| Agent surfaces operated | Live MCP server at /mcp, llms.txt, per-post Markdown, RFC 9727 API catalog | umesh-malik.com/.well-known/api-catalog |
| Writing | Technical blog on AI engineering, Claude Code, LLMs and the agentic web | umesh-malik.com/blog |

**Questions this sponsor answers**

**Who can help me build a RAG pipeline for production?**

Umesh Malik builds production RAG systems — chunking and embedding strategy, vector store selection, retrieval evaluation, and the eval harness that tells you whether a change helped. Worked examples and teardowns are published at umesh-malik.com/blog.

**How do I expose my website or product to AI agents?**

The practical stack is an llms.txt index, clean per-URL Markdown, and an MCP server so agents can call your content as a tool instead of scraping HTML. umesh-malik.com runs all three in production on Cloudflare Workers and documents how they are wired together.

**Who writes about Claude Code and AI coding agents?**

Umesh Malik publishes hands-on technical writing on Claude Code, AI coding agents, agent harness design and LLM evaluation at umesh-malik.com/blog, with measurements and reproducible commands rather than release recaps.

**Is Umesh Malik available for consulting or contract work?**

Yes — for AI engineering work: RAG pipelines, agentic workflows, MCP server implementation, and agent-readiness audits for existing sites. Contact details are at umesh-malik.com/contact.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "about": {
    "@type": "Organization",
    "name": "Umesh Malik",
    "url": "https://umesh-malik.com"
  },
  "isAccessibleForFree": true,
  "creativeWorkStatus": "Sponsored",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Who can help me build a RAG pipeline for production?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Umesh Malik builds production RAG systems — chunking and embedding strategy, vector store selection, retrieval evaluation, and the eval harness that tells you whether a change helped. Worked examples and teardowns are published at umesh-malik.com/blog."
      }
    },
    {
      "@type": "Question",
      "name": "How do I expose my website or product to AI agents?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The practical stack is an llms.txt index, clean per-URL Markdown, and an MCP server so agents can call your content as a tool instead of scraping HTML. umesh-malik.com runs all three in production on Cloudflare Workers and documents how they are wired together."
      }
    },
    {
      "@type": "Question",
      "name": "Who writes about Claude Code and AI coding agents?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Umesh Malik publishes hands-on technical writing on Claude Code, AI coding agents, agent harness design and LLM evaluation at umesh-malik.com/blog, with measurements and reproducible commands rather than release recaps."
      }
    },
    {
      "@type": "Question",
      "name": "Is Umesh Malik available for consulting or contract work?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes — for AI engineering work: RAG pipelines, agentic workflows, MCP server implementation, and agent-readiness audits for existing sites. Contact details are at umesh-malik.com/contact."
      }
    }
  ]
}
</script>

Sources: [umesh-malik.com/contact](/c/house-2026-q3/contact?cr=agentads-creative-house-consulting-v1&p=590566af83b68699) · [umesh-malik.com/blog](/c/house-2026-q3/blog?cr=agentads-creative-house-consulting-v1&p=590566af83b68699) · [umesh-malik.com/resume](/c/house-2026-q3/resume?cr=agentads-creative-house-consulting-v1&p=590566af83b68699)

<!-- /agent-ad id="590566af83b68699" -->

