# Soft 404 & Indexability Auditor (`fayacuts/soft-404-auditor`) Actor

Finds pages that answer HTTP 200 while showing 'not found', probes every route family with impossible URLs, and audits sitemap URLs for errors, redirects, noindex and canonical mismatches — with cache-header evidence for Next.js, Vercel, Netlify and Cloudflare.

- **URL**: https://apify.com/fayacuts/soft-404-auditor.md
- **Developed by:** [Ricardo Faya](https://apify.com/fayacuts) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Soft 404 & Indexability Auditor

Find the pages that **answer HTTP 200 while showing "page not found"** — and the route families where **any invented URL becomes an indexable page**.

### Why this exists

On a production Next.js site we found that **every dynamic route** answered 200 on its not-found page. The ISR cache had stored the `notFound()` render and served it as a valid page (`x-nextjs-prerender: 1`). Uptime monitors were green, nothing logged an error, and search engines could index an unlimited number of empty pages. Adding a root `not-found.tsx` did **not** fix it.

Classic crawlers only check the URLs that exist. The defect lives in the URLs that **don't**.

### What it does

1. **Discovers your sitemaps** from `robots.txt` (or takes a sitemap/page URL), follows sitemap indexes.
2. **Audits every URL** and flags:
   - `soft-404` — HTTP 200 whose title or H1 says "not found" (EN, PT, ES, FR, DE built in; add your own phrases);
   - `possible-soft-404` — thin 200 page containing a not-found phrase;
   - `error-status` — 4xx/5xx listed in the sitemap;
   - `redirect` — sitemap URL that redirects (with the full chain);
   - `noindex` — sitemap URL that is noindex (meta or `X-Robots-Tag`);
   - `canonical-elsewhere` — canonical pointing to another URL;
   - `missing-title`.
3. **Probes each route family** (`/blog/`, `/pt-BR/course/`, `/products/`…) with a URL that cannot exist. A `SOFT-404 ROUTE` verdict comes with the **cache headers as evidence** — `x-nextjs-prerender`, `x-nextjs-cache`, `x-vercel-cache`, `cf-cache-status`, `netlify-cdn-cache-control`, `age` — and a plain-English explanation.

### Output

Dataset rows of two types:

```json
{
  "type": "route-probe",
  "url": "https://example.com/pt-BR/curso/soft404-probe-x7k2m9qa",
  "routePrefix": "/pt-BR/curso/",
  "statusCode": 200,
  "verdict": "SOFT-404 ROUTE",
  "title": "Página não encontrada | Example",
  "evidenceHeaders": { "x-nextjs-prerender": "1", "cache-control": "public, max-age=0, must-revalidate" },
  "explanation": "A URL that cannot exist answered HTTP 200. Any mistyped, deleted or invented URL under /pt-BR/curso/ can be crawled and indexed as a real page. Next.js cache headers are present: ..."
}
```

```json
{
  "type": "page",
  "url": "https://example.com/old-offer",
  "statusCode": 200,
  "worstSeverity": "critical",
  "issues": [{ "code": "soft-404", "severity": "critical", "detail": "HTTP 200 but the page says \"page not found\"." }]
}
```

The key-value store `OUTPUT` has totals per issue code and per site.

### Good to know

- Audit **your own** sites or sites you are authorized to test. Keep concurrency low on small servers.
- Compressed `.xml.gz` sitemaps are skipped with a warning — pass the uncompressed URL.
- Pages rendered only in the browser (client-side "not found") are judged by the HTML the server returns, which is what crawlers see first.

# Actor input Schema

## `startUrls` (type: `array`):

A site root (sitemaps are discovered from robots.txt), a sitemap .xml URL, or individual page URLs.

## `maxUrls` (type: `integer`):

Upper bound on sitemap URLs audited per site.

## `probeRoutes` (type: `boolean`):

Requests a URL that cannot exist under each route family (e.g. /blog/soft404-probe-x7k2). If it answers 200, every invented URL there is indexable.

## `maxProbes` (type: `integer`):

How many route families (e.g. /blog/, /products/) get an impossible-URL probe.

## `maxConcurrency` (type: `integer`):

Be gentle with your own server. Maximum 20.

## `notFoundPatterns` (type: `array`):

Text that marks a not-found page when found in the title or H1 of an HTTP 200 response. Leave empty for the built-in list (English, Portuguese, Spanish, French, German).

## `userAgent` (type: `string`):

Optional User-Agent header. Leave empty for the default auditor agent.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ],
  "maxUrls": 500,
  "probeRoutes": true,
  "maxProbes": 25,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

One row per audited page and per route-family probe, with issues and cache-header evidence.

## `summary` (type: `string`):

Totals for the whole run (key-value store record OUTPUT).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://apify.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fayacuts/soft-404-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://apify.com/" }] }

# Run the Actor and wait for it to finish
run = client.actor("fayacuts/soft-404-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ]
}' |
apify call fayacuts/soft-404-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fayacuts/soft-404-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/u6bUT0YH1LSdrI7I1/builds/fbacrPVYFxPN8gKeF/openapi.json
