# Site Health Audit - Broken Links, Redirects, Sitemap Gaps (`teal_blacksmith/site-health-audit`) Actor

Crawl your own site over plain HTTP and get a fix-list, not a score: broken links, redirect chains and loops, canonical and noindex conflicts, sitemap gaps, duplicate titles. $0.002 per crawled page, summary free. Respects robots.txt, no browser, no proxy.

- **URL**: https://apify.com/teal_blacksmith/site-health-audit.md
- **Developed by:** [도영 김](https://apify.com/teal_blacksmith) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 page crawleds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### What does Site Health Audit do?

Point it at a website you own or manage. It crawls the site over plain HTTP, reads its sitemaps, and gives you a **fix-list, not a vanity score**: every row says what is wrong on that page, how serious it is, and what to change.

- **Broken links.** Pages that return 4xx or 5xx, internal links that point at them (listed on the page that links), and optionally broken external links.
- **Redirects.** The full redirect chain per URL with the status of every hop, chains longer than one hop, redirect loops, `http://` links that bounce to `https://`, and internal links that point at a URL that redirects.
- **Canonical and indexing.** Self, other, missing, offsite, or pointing at a URL that is not a plain 200. `noindex` from meta tags and from the `X-Robots-Tag` header.
- **Sitemap gaps.** Sitemap URLs that return errors, redirect, are `noindex`, or are not the canonical URL; and indexable pages the crawl found that the sitemap does not list.
- **Titles, descriptions, h1, hreflang.** Missing, too long or too short, duplicated across pages; hreflang codes, self-references and return links.
- **One summary row** with counts and the **top issues sorted by severity**, each with example URLs and the fix.

There is no browser, no proxy and no login. That keeps it cheap, predictable and fast, and it sets limits: read [Limits](#limits) before you rely on it.

### How much does it cost?

| Event | Price | When |
|---|---|---|
| `page` | $0.002 | Once per crawled page row |

**1,000 pages cost $2.00.** The most a run can cost is `maxPages x $0.002`. The default run (10 pages) costs $0.02.

Not charged: the `site-summary` row, the `run-status` rows, redirect hops, robots.txt, sitemap files, canonical-target checks and external-link checks. If the site cannot be audited (unreachable, blocked, start page disallowed by robots.txt, start page redirecting to another domain, invalid input) you get one `run-status` row and pay nothing. A page that is itself broken (404, 500, timeout) is a page row and is charged: it is the result you asked for.

Set a maximum charge for the run in the Apify Console or API (`maxTotalChargeUsd`). The Actor works out how many pages that covers before it sends a request and never crawls more. When the budget ends the crawl you get the page rows it read, a free `budget_stopped` row, and the summary for what was crawled.

### How to use it

1. Enter your site in `startUrl` and set `maxPages`.
2. Start the run and open the dataset.
3. Read the last row (`recordType: site-summary`) first: `topIssues` is your to-do list, worst first.
4. Filter page rows by `worstSeverity`, or open the `fixList` view, to see which URL needs what.

Pages are discovered through links first (breadth-first), then from the sitemap. For a large site, raise `maxPages` until `complete` is `true` in the summary.

### Input

```json
{
  "startUrl": "https://crawlee.dev",
  "maxPages": 10,
  "respectRobotsTxt": true,
  "readSitemap": true,
  "maxSitemapUrls": 10000,
  "checkExternalLinks": false,
  "maxExternalLinks": 50,
  "maxConcurrency": 3,
  "requestTimeoutSecs": 15
}
```

| Field | Default | Notes |
|---|---|---|
| `startUrl` | `https://crawlee.dev` | URL or domain. The crawl stays on its registrable domain, subdomains included. |
| `maxPages` | 10 (max 2000) | Hard cap on crawled pages and on what you can be charged. |
| `respectRobotsTxt` | true | Disallowed URLs are not requested; Crawl-delay is honored up to 10 seconds. |
| `readSitemap` | true | `Sitemap:` lines in robots.txt, then `/sitemap.xml` (then `/sitemap_index.xml` and `/wp-sitemap.xml` if nothing is found). Sitemap indexes and `.gz` files are supported. |
| `maxSitemapUrls` | 10000 | If the sitemap is bigger, the missing-from-sitemap check is skipped. |
| `checkExternalLinks` | false | HEAD then GET fallback on outbound links, most-linked first. Free. |
| `maxExternalLinks` | 50 | Distinct external URLs checked. |
| `maxConcurrency` | 3 (max 3) | Concurrent requests to the site. Request starts are also at least 100 ms apart. |
| `requestTimeoutSecs` | 15 | A page that does not answer is a `request_failed` row. |

### Output

The dataset holds three record types.

**Page row** (`recordType: page`, charged). One per crawled page. Main fields: `url`, `status`, `finalUrl`, `redirectHops`, `redirectChain` (url and status per hop), `redirectLoop`, `httpToHttps`, `responseTimeMs`, `contentType`, `title`, `titleLength`, `metaDescription`, `metaDescriptionLength`, `duplicateTitle`, `duplicateMetaDescription`, `h1Count`, `canonical`, `canonicalStatus` (`self`, `other`, `offsite`, `non_200`, `missing`), `noindex`, `indexable`, `hreflang`, `internalLinksFound`, `brokenLinks`, `externalBrokenLinks`, `inSitemap`, `foundVia` (`start`, `link`, `sitemap`), `depth`, and `issues` (each with `code`, `severity` and an optional `detail`) plus `issueCount` and `worstSeverity`.

When a URL redirects, its row describes the page it lands on (title, h1 and so on) and shows the chain. If that landing URL was also crawled directly, the duplicate checks count it once.

**Summary row** (`recordType: site-summary`, free, always last). `pagesCrawled`, `complete` and `stopReason` (`queue_exhausted`, `max_pages`, `budget`, `time_limit`, `rate_limited`), `statusClasses`, `issuesBySeverity`, `topIssues` (code, severity, title, count, `fix`, up to 5 example URLs), response time average and p95, sitemap facts (files read, URLs listed, crawled, with problems, indexable pages missing), robots facts, requests sent and duration. The run also saves the summary as `SUMMARY` in the key-value store, with billing counts.

**Run-status row** (`recordType: run-status`, free). It appears instead of the audit when the run cannot proceed, or before the summary when the budget ended the crawl:

| Status | Meaning |
|---|---|
| `invalid_input` | The start URL is not a URL, or points at a private or internal address. |
| `unreachable` | DNS, connection, TLS or timeout failure on the start page. |
| `blocked` | The start page answered 401, 403, 429 or a bot challenge. The Actor does not try to get around it. |
| `robots_disallowed` | robots.txt disallows the start page (or robots.txt answers 5xx). |
| `redirected_offsite` | The start page redirects to another registrable domain. Not followed. |
| `budget_stopped` | The maximum charge ended the crawl; page rows and the summary for what was crawled are still delivered. |

### Issue codes

Sorted by severity. Every code appears in `issues` on the page it applies to and, with counts and examples, in `topIssues`.

| Code | Severity | What it means and how to fix it |
|---|---|---|
| `request_failed` | critical | Page could not be fetched. The server did not answer (timeout, connection or TLS error). Check hosting, firewall and certificate for these URLs. |
| `http_5xx` | critical | Server error (5xx). Fix the server-side error; search engines drop pages that keep returning 5xx. |
| `http_4xx` | high | Page returns 4xx. Restore the page, redirect it to the closest replacement with a 301, or remove every link to it. |
| `redirect_loop` | high | Redirect loop. The redirects send the visitor in a circle. Fix the redirect rules so the chain ends on a 200 page. |
| `too_many_redirects` | high | Redirect chain longer than 10 hops. Point the first URL directly at the final destination. |
| `broken_internal_link` | high | Page links to a broken internal URL. Update or remove the link, or restore the target page. The broken targets are listed in `brokenLinks`. |
| `canonical_not_200` | high | Canonical URL does not return 200. The canonical tag points at a URL that redirects, errors or is missing. Point it at the final, indexable URL. |
| `noindex_in_sitemap` | high | noindex page listed in the sitemap. Either remove the noindex or remove the URL from the sitemap; the two signals contradict each other. |
| `non_canonical_in_sitemap` | high | Sitemap lists a non-canonical URL. List only the canonical version of each page in the sitemap. |
| `sitemap_url_not_200` | high | Sitemap URL does not return 200. Remove dead URLs from the sitemap or fix the pages. Sitemaps should list only live, indexable URLs. |
| `sitemap_url_redirects` | medium | Sitemap URL redirects. List the final URL in the sitemap instead of the redirecting one. |
| `redirect_chain` | medium | Redirect chain (more than 1 hop). Collapse the chain: redirect the first URL straight to the final URL and update internal links. |
| `canonical_offsite` | medium | Canonical points to another domain. Make sure this is intended; otherwise this page will not rank under your domain. |
| `missing_from_sitemap` | medium | Indexable page missing from the sitemap. Add the page to the sitemap, or noindex it if it should not be in search results. |
| `no_sitemap` | medium | No sitemap found. Publish /sitemap.xml and reference it in robots.txt with a Sitemap: line. |
| `sitemap_unreadable` | medium | Sitemap could not be read. The sitemap returned an error or is not valid XML or text. Fix or regenerate it. |
| `missing_title` | medium | Missing title. Add a unique, descriptive title element to the page. |
| `duplicate_title` | medium | Duplicate title. Give each page its own title; duplicates make pages compete with each other. |
| `missing_h1` | medium | No h1. Add one h1 that names the page topic. |
| `broken_external_link` | medium | Broken external link. Replace or remove the outbound link. Only checked when `checkExternalLinks` is on. |
| `hreflang_invalid` | medium | Invalid hreflang code. Use ISO 639-1 language codes, optionally with an ISO 3166-1 region (en, en-GB, x-default). |
| `hreflang_missing_return` | medium | hreflang target does not link back. hreflang annotations must be reciprocal: the target page must list this page too. |
| `hreflang_target_not_200` | medium | hreflang target does not return 200. Point hreflang at live pages. |
| `slow_response` | low | Slow response (over 2 s). Time to first byte over 2 seconds. Check caching and server speed. |
| `title_too_long` | low | Title longer than 60 characters. Shorten the title so it is not cut off in results. |
| `title_too_short` | low | Title shorter than 10 characters. Write a more descriptive title. |
| `missing_meta_description` | low | Missing meta description. Add a unique summary of 70 to 160 characters. |
| `meta_description_too_long` | low | Meta description longer than 160 characters. Shorten it so it is not truncated in results. |
| `duplicate_meta_description` | low | Duplicate meta description. Write a distinct description per page. |
| `multiple_h1` | low | More than one h1. Keep a single h1 per page. |
| `canonical_missing` | low | No canonical tag. Add a self-referencing canonical to indexable pages. |
| `hreflang_no_self` | low | hreflang set has no self-reference. Each page in a hreflang set must list itself as well. |
| `links_to_redirect` | low | Page links to a URL that redirects. Link to the final URL directly; it saves a request and keeps link equity clean. |
| `redirect_http_to_https` | low | Internal link uses http and redirects to https. Update the internal link to https. |
| `external_link_unverified` | low | External link could not be verified. The remote host timed out or refused the check. Open the link by hand. |
| `redirect` | info | URL redirects (1 hop). Normal for http-to-https or trailing-slash rules. Make sure internal links point at the final URL. |
| `canonical_other` | info | Canonical points to a different URL on the same site. Fine for duplicates and parameters. Make sure it is intended. |
| `noindex` | info | Page is noindex. Excluded from search results. Confirm it is intended. |

### Measured results

Runs from a Windows PC with default settings, 2026-11-15. The samples are small; read them as an indication.

| Site | Pages | Requests | Time | What it found |
|---|---|---|---|---|
| crawlee.dev | 10 | 17 | 4.8 s | 7 over-long titles, 6 duplicate descriptions, 1 page without h1, 3 internal links to redirecting `www` URLs |
| WordPress.org news | 15 | 43 | 13.3 s | 5 over-long descriptions, 3 missing descriptions; 25 sitemap files read, and because the sitemap is large the missing-from-sitemap check was skipped |
| FastAPI docs (many languages) | 15 | 17 | 1.7 s | 26 hreflang return-link problems, 13 duplicate titles, 12 language pages missing from the sitemap |
| paulgraham.com (small static site) | 12 | 72 | 45 s with 28 external links checked | no sitemap, no canonical or description on any page, 5 broken external links (404s and dead domains) |
| httpbingo.org/redirect/3 | 1 | 8 | 2.4 s | the 3-hop redirect chain with every hop status |

Findings were spot-checked by hand with curl: three broken external links (a 404, a dead domain, a redirect that ends in a 404), the `www` redirects, the FastAPI hreflang tags and the missing language pages in its sitemap.

### Limits

- **Plain HTTP only.** Links that exist only after JavaScript runs are not seen, and titles or h1 added by scripts are not read. Server-rendered and static sites are covered; single-page apps with client-side rendering are not.
- **HTML pages only.** Images, PDFs, scripts and stylesheets are not requested or checked. A broken image is not reported.
- **Same registrable domain.** Subdomains of the start domain are crawled; other domains are touched only by the optional external-link check.
- **Soft 404s are not detected.** A page that answers 200 with a "not found" message counts as a good page.
- **Response time** is the time to first byte from the Apify platform, one sample per page. It is not Core Web Vitals and not a Lighthouse score.
- **Sitemap checks need a readable sitemap.** Missing-from-sitemap is skipped when the sitemap is larger than `maxSitemapUrls` or a sitemap file could not be read, because the answer could not be trusted. Sitemap URLs that were not crawled (because of `maxPages`) are counted in `urlsNotCrawled`, not judged.
- **Broken-link detection covers crawled targets.** An internal link to a URL that was not crawled because of `maxPages` is not judged. Raise `maxPages` or check `complete`.
- **External links** on hosts that block automated checks (401, 403, 429, 999) or time out are counted as unverified, not broken. A dead domain is broken.
- **Rate limits.** At most 3 concurrent requests and 100 ms between request starts, more if robots.txt asks for it. Three 429 answers in a row stop the crawl (`rate_limited`).
- **Bot walls are not bypassed.** No proxy, no browser fingerprinting, no retries against a block.
- **Audit sites you own or manage.** The crawler identifies itself as `SiteHealthAudit` in its user agent.

### FAQ

**Is this an SEO score?** No. There is no score. You get the list of concrete problems and where they are.

**Does it follow robots.txt?** Yes by default. For your own site you can switch it off with `respectRobotsTxt: false`.

**Why did I get one row and no audit?** Look at the `status` of the `run-status` row. Those runs are free.

**Can I run it daily?** Yes. Use a fixed `maxPages` and compare `topIssues` between runs, or schedule it from the Apify Console.

### For agents and MCP clients

- No credentials, cookies or API keys are needed. Audit only sites you own or manage.
- A site that cannot be audited returns one free `run-status` row (`invalid_input`, `unreachable`, `blocked`, `robots_disallowed`, `redirected_offsite`, `budget_stopped`); a finished crawl ends with a free `site-summary` row whose `complete` and `stopReason` say whether everything was read.
- Rows are bounded by `maxPages` (default 10, at most 2000); each `topIssues` entry lists at most 5 example URLs.
- Cost is bounded before the run starts: `maxPages × $0.002`, or lower with a maximum charge.
- Use it from Claude, Cursor or any MCP client through the Apify MCP server (`https://mcp.apify.com`) — the tool arguments come from this Actor's input schema.

# Actor input Schema

## `startUrl` (type: `string`):

The site to audit, as a URL or a domain (example.com). The crawl stays on this site: its registrable domain including subdomains. A start page that redirects to another domain is reported as redirected_offsite and not charged.

## `maxPages` (type: `integer`):

Hard cap on crawled pages, and the most you can be charged for: maxPages x $0.002. Redirect hops, robots.txt, sitemap files and link checks are not pages and are not charged. Pages are discovered through links first, then from the sitemap.

## `respectRobotsTxt` (type: `boolean`):

When on, robots.txt is read first, disallowed URLs are not requested and Crawl-delay is honored up to 10 seconds. If the start page itself is disallowed the run ends with status robots_disallowed and no charge.

## `readSitemap` (type: `boolean`):

Reads the Sitemap lines of robots.txt, then /sitemap.xml (plus /sitemap_index.xml and /wp-sitemap.xml when that finds nothing). Sitemap indexes and .gz files are supported. Enables the sitemap checks: listed URLs that fail, redirect, are noindex or non-canonical, and crawled indexable pages that are missing.

## `maxSitemapUrls` (type: `integer`):

Most sitemap URLs kept for the comparison. If the sitemap is larger, the missing-from-sitemap check is skipped because it could not be trusted.

## `checkExternalLinks` (type: `boolean`):

Also verifies outbound links to other domains with a HEAD request and a GET fallback, at most 3 requests at a time and 300 ms apart per host. Not charged. Hosts that block automated checks (401, 403, 429) are reported as unverified, not broken.

## `maxExternalLinks` (type: `integer`):

Cap on distinct external URLs checked, most-linked first.

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

Concurrent requests to the audited site. Never more than 3. Request starts are also spaced at least 100 ms apart.

## `requestTimeoutSecs` (type: `integer`):

Time limit for one request. A page that does not answer in time is a request_failed row.

## Actor input object example

```json
{
  "startUrl": "https://crawlee.dev",
  "maxPages": 10,
  "respectRobotsTxt": true,
  "readSitemap": true,
  "maxSitemapUrls": 10000,
  "checkExternalLinks": false,
  "maxExternalLinks": 50,
  "maxConcurrency": 3,
  "requestTimeoutSecs": 15
}
```

# Actor output Schema

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

One row per crawled page (recordType page) with its issues, plus one final site-summary row with counts and the top issues sorted by severity.

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

Pages crawled, stop reason, issue counts by severity, requests, and billing counts.

# 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 = {
    "startUrl": "https://crawlee.dev"
};

// Run the Actor and wait for it to finish
const run = await client.actor("teal_blacksmith/site-health-audit").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 = { "startUrl": "https://crawlee.dev" }

# Run the Actor and wait for it to finish
run = client.actor("teal_blacksmith/site-health-audit").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 '{
  "startUrl": "https://crawlee.dev"
}' |
apify call teal_blacksmith/site-health-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,teal_blacksmith/site-health-audit"
        }
    }
}
```

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/oOVwyEGO2x3kLERPq/builds/RCRtCtegJpGNspvcq/openapi.json
