# Sitemap & Indexability Auditor: Noindex, Canonical, Hreflang (`benexe/sitemap-indexability-auditor`) Actor

Audit every URL in your sitemaps for indexability: HTTP status and redirects, noindex (meta and X-Robots-Tag), canonical, robots.txt, hreflang and lastmod. Get a verdict with reasons per URL, a summary per page template and regression alerts between scheduled runs.

- **URL**: https://apify.com/benexe/sitemap-indexability-auditor.md
- **Developed by:** [Marcel Tomas](https://apify.com/benexe) (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

from $1.00 / 1,000 url auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Sitemap & Indexability Auditor: Noindex, Canonical, Hreflang

Find out which URLs in your sitemaps **Google cannot index, and why** — plus the on-page basics (titles, meta descriptions, H1) for every URL, at a fraction of the price of a full crawler. For every sitemap URL the Actor checks HTTP status and redirects, `noindex` in the HTML and in the `X-Robots-Tag` header, the canonical tag (HTML and `Link` header), robots.txt rules for Googlebot, hreflang and lastmod. You get a clear verdict with reasons per URL, a summary per page template, and alerts when something becomes non-indexable between scheduled runs.

Built for SEO and WordPress/WooCommerce agencies, site migrations and in-house teams that keep sitemaps clean.

### What you get per URL

| Field | Meaning |
|---|---|
| `indexable` | `true`, `false`, or `null` when the URL could not be reached |
| `blockers` | Why it is not indexable: `http-3xx`, `http-4xx`, `http-5xx`, `redirect-loop`, `too-many-redirects`, `blocked-by-robots`, `noindex-meta`, `noindex-header`, `canonical-other`, `non-html`, `fetch-failed` |
| `warnings` | Worth fixing, not blocking: `canonical-missing`, `canonical-conflict`, `canonical-not-absolute-match`, `hreflang-invalid-code`, `hreflang-missing-self`, `hreflang-missing-x-default`, `hreflang-not-reciprocal`, `hreflang-target-not-indexable`, `lastmod-in-future`, `lastmod-older-than-1y`, `slow-response`, `body-truncated`, `robots-unavailable`, `title-missing`, `title-too-long` (>60 chars), `title-duplicate`, `meta-description-missing`, `meta-description-too-long` (>160 chars), `meta-description-duplicate`, `h1-missing`, `h1-multiple` |
| Details | HTTP status, redirect chain, final URL, canonical and its class (`self`, `other`, `missing`, `conflict`), meta robots, X-Robots-Tag, hreflang list, title, meta description, H1s, response time |
| `diff`, `regression` | With a Monitor ID: what changed since the last run |

The key-value store also gets **SUMMARY** (per site and template: indexable rate, counts per blocker and warning) and **ISSUES** (non-indexable URLs and regressions, ready for alerts).

### Quick start

1. Enter your domain (e.g. `example.com`). The Actor finds the sitemaps in robots.txt or at the usual WordPress / Yoast / Rank Math locations.
2. Run it. Leave *Samples per template* at 0 to audit everything, or set e.g. 10 to audit 10 URLs per template on large sites.
3. For monitoring, set a *Monitor ID* and create an Apify **Schedule** (weekly works well). Connect the *Not indexable only* view or the `ISSUES` record to Slack, email, n8n or Make.

### Good to know

- **Polite by default:** at most 4 requests per second per site, robots.txt `Crawl-delay` honoured, honest User-Agent `IndexabilityAuditor/0.1 (Apify Actor; +https://apify.com)`. URLs that robots.txt blocks for Googlebot are reported without being fetched.
- **Firewalls:** some sites block automated requests (HTTP 403). Allow-list the User-Agent above to audit them; those URLs are reported with a clear message and are not charged.
- **robots.txt rules** follow RFC 9309 and Google's documented behaviour (most specific group, longest match, `*` and `$`; 4xx = allow all; 5xx or unreachable = disallow all).
- **Duplicates** are checked among indexable pages of the same site in the same run.
- **No JavaScript rendering:** tags injected by JavaScript are not seen (most SEO plugins output them server-side).
- Large sitemaps: up to 50 sitemap files and 50,000 URLs are read per run; files you name explicitly are read first.

### Pricing (pay per event)

| Event | When |
|---|---|
| `url-audited` | One URL with a verdict delivered |

**Never charged:** URLs that could not be reached (timeouts, network errors), invalid input, and anything beyond your max-charge limit — the run audits only as many URLs as your limit covers. *(Prices: see the Pricing tab.)*

### Related

- [Core Web Vitals Monitor](https://apify.com/benexe/core-web-vitals-monitor): real-user CrUX data, Lighthouse lab audits, trends and regression alerts per page template.

### Support

Open an issue on the Actor's *Issues* tab with the run ID.

# Actor input Schema

## `domains` (type: `array`):

Sites to audit, e.g. example.com or example.com/blog. Sitemaps are discovered from robots.txt, then /sitemap_index.xml, /sitemap.xml and /wp-sitemap.xml. With a path, only sitemaps under that path are used.

## `sitemapUrls` (type: `array`):

XML sitemap or sitemap index URLs (gzip supported). These are read before discovered sitemaps.

## `urls` (type: `array`):

Individual URLs to audit (in addition to, or instead of, sitemaps).

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

Hard cap after sampling. Never more than your max-charge limit allows.

## `samplesPerTemplate` (type: `integer`):

0 = audit every sitemap URL (up to Max URLs). Otherwise, the number of URLs per site and page template (product, post, category…), chosen deterministically.

## `templateRules` (type: `array`):

Override template detection. Items: {"name": "product", "pattern": "/shop/"} (regex tested on the URL).

## `requestsPerSecondPerHost` (type: `integer`):

Politeness limit per host. A robots.txt Crawl-delay of 1 s or more is honoured (capped at 10 s).

## `checkHreflang` (type: `boolean`):

Validate language codes, self-reference, x-default and reciprocity between audited pages.

## `monitorId` (type: `string`):

Set a name (letters, digits, hyphens) to compare each run with the previous one and flag URLs that became non-indexable. Stored in your account in the key-value store "indexability-monitor-<id>".

## `healthCheck` (type: `boolean`):

Internal: runs a fixed known-good input. Never charged.

## Actor input object example

```json
{
  "domains": [
    "web.dev"
  ],
  "maxUrls": 500,
  "samplesPerTemplate": 0,
  "requestsPerSecondPerHost": 4,
  "checkHreflang": true,
  "healthCheck": false
}
```

# Actor output Schema

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

All audited URLs with verdict, reasons, status, redirects, canonical, robots and hreflang details.

## `notIndexable` (type: `string`):

URLs Google cannot index, with the reasons.

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

Indexable rate and counts per blocker and warning, per site and page template.

## `issues` (type: `string`):

Non-indexable URLs and regressions, ready for Slack, email, n8n or Make alerts.

## `runSummary` (type: `string`):

Counts, requests, budget and stop reason for this run.

# 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 = {
    "domains": [
        "web.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("benexe/sitemap-indexability-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 = { "domains": ["web.dev"] }

# Run the Actor and wait for it to finish
run = client.actor("benexe/sitemap-indexability-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 '{
  "domains": [
    "web.dev"
  ]
}' |
apify call benexe/sitemap-indexability-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,benexe/sitemap-indexability-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/mPa3a0dA1q7OeqefE/builds/QccSnxthQxEDkjm7S/openapi.json
