# URL Status Checker: Redirect Checker & HTTP Status Codes (`ondutylabs/url-status-checker`) Actor

Bulk URL status checker and redirect checker: HTTP status code, full redirect chain, final URL, response time, content type. Optional SEO signals: canonical, meta robots, X-Robots-Tag, hreflang, noindex. Plain HTTP, no browser.

- **URL**: https://apify.com/ondutylabs/url-status-checker.md
- **Developed by:** [kilde](https://apify.com/ondutylabs) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 urls checked

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/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

## Dead Link Checker & Redirect Checker: HTTP Status Codes

**Dead link checker, broken link finder and redirect checker for bulk URL lists.** Paste many URLs and get the **HTTP status code**, the full **redirect chain** (every hop with its status code), the final URL, response time and content type for each one. Each row also gets an `alive` / `dead` / `soft_dead` / `bot_blocked` / `unknown` **verdict** that catches **soft 404** pages (HTTP 200 with a "not found" page) and, optionally, the closest **Wayback Machine** snapshot of a dead link. Optionally it also reads the SEO indexing signals: **canonical**, **meta robots**, **X-Robots-Tag** and **hreflang**, and flags `noindex` pages.

It uses plain HTTP requests only. There is no browser and no JavaScript rendering, so runs are fast and cheap.

### Use cases

- **Site migration and redirect audits**: verify that old URLs return 301 and land on the right final URL, and find redirect chains with several hops or loops.
- **Broken link and dead link checks**: find 404, 410 and 5xx responses, plus soft 404 pages, in a list exported from a sitemap, CMS, analytics or backlink tool.
- **Link rot recovery**: with `checkWayback`, get the closest Wayback Machine snapshot for dead links.
- **Source checks for AI-written content**: check the links in an article, report or answer written by an AI model or agent before you publish it. See [Check source links in AI-written text](#check-source-links-in-ai-written-text).
- **Indexability checks**: find pages that are `noindex` (meta robots or X-Robots-Tag header) or whose canonical points somewhere else.
- **International SEO**: collect the hreflang map of each page and compare it with what you expect.
- **Uptime and response-time spot checks** for a list of landing pages, with content type and timing per URL.

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | required | List of http(s) URLs. Duplicates and `#fragments` are removed; a missing scheme becomes `https://`. |
| `checkSeo` | `true` | Read canonical, meta robots, X-Robots-Tag and hreflang. Uses GET and reads only up to `</head>` (or the size limit). When off, a cheaper HEAD request is used, with GET as fallback if the server rejects HEAD. |
| `checkWayback` | `false` | For `dead` / `soft_dead` verdicts, add the closest Wayback Machine snapshot (`waybackAvailable`, `waybackUrl`, `waybackTimestamp`). 1 lookup per second. |
| `maxRedirects` | `10` | Redirects to follow per URL (0 to 30). Longer chains are reported as `too_many_redirects`. |
| `timeoutSecs` | `15` | Timeout per request in the chain (1 to 120). |
| `maxHtmlKb` | `128` | Max HTML read when SEO signals are on (8 to 2048 KB). |
| `maxConcurrencyPerHost` | `2` | Max simultaneous requests to the same host (1 to 20). |
| `maxConcurrency` | `20` | Max simultaneous requests overall (1 to 200). |
| `userAgent` | empty | Optional custom User-Agent. The default identifies the checker. |

Example input:

```json
{
  "urls": ["https://example.com", "http://github.com", "https://apify.com/about"],
  "checkSeo": true,
  "maxRedirects": 10,
  "maxConcurrencyPerHost": 2
}
```

### Output

One dataset row per input URL. Example (values are illustrative):

```json
{
  "inputUrl": "http://github.com",
  "inputIndex": 1,
  "finalUrl": "https://github.com/",
  "statusCode": 200,
  "ok": true,
  "redirected": true,
  "redirectCount": 2,
  "redirectChain": [
    { "url": "http://github.com", "statusCode": 301, "location": "https://github.com/", "timeMs": 80 },
    { "url": "https://github.com/", "statusCode": 200, "location": null, "timeMs": 190 }
  ],
  "contentType": "text/html; charset=utf-8",
  "responseTimeMs": 190,
  "totalTimeMs": 270,
  "method": "GET",
  "error": null,
  "errorType": null,
  "blocked": false,
  "blockedReason": null,
  "canonicalHtml": "https://github.com/",
  "canonicalHeader": null,
  "metaRobots": null,
  "metaRobotsBots": null,
  "xRobotsTag": null,
  "hreflang": null,
  "noindex": false,
  "checkedAt": "2026-11-27T01:00:00+00:00",
  "verdict": "alive",
  "verdictReason": "HTTP 200",
  "browserUaRetry": false,
  "waybackAvailable": null,
  "waybackUrl": null,
  "waybackTimestamp": null
}
```

| Field | Description |
|---|---|
| `inputUrl`, `inputIndex`, `finalUrl` | The URL you gave, its position in the de-duplicated list, and where it ended up (null on error) |
| `statusCode`, `ok`, `redirected` | Final HTTP status; `ok` is true for 2xx; `redirected` is true if any redirect was followed |
| `redirectCount`, `redirectChain` | Number of redirects, and each hop: `url`, `statusCode`, `location`, `timeMs` |
| `responseTimeMs`, `totalTimeMs` | Time to response headers of the final request / time for the whole chain |
| `contentType`, `method` | Final Content-Type, and the method used for the final request (HEAD or GET) |
| `error`, `errorType` | What went wrong. `errorType` is `dns`, `timeout`, `ssl`, `connection`, `network`, `redirect_loop`, `too_many_redirects`, `blocked`, `invalid_url` or `other` |
| `blocked`, `blockedReason` | True if the URL or a redirect hop points to a private or internal address |
| `canonicalHtml`, `canonicalHeader` | Canonical from the `<link rel="canonical">` tag and from the `Link` header |
| `metaRobots`, `metaRobotsBots` | `<meta name="robots">` content, and googlebot / googlebot-news / bingbot meta tags |
| `xRobotsTag` | X-Robots-Tag header values |
| `hreflang` | Map of language code to URL (HTML link tags and Link header) |
| `noindex` | True if any robots directive contains `noindex` or `none` |
| `checkedAt` | Check time, ISO 8601 UTC |
| `verdict`, `verdictReason`, `browserUaRetry` | Verdict (see below), why, and whether a browser User-Agent retry was made |
| `waybackAvailable`, `waybackUrl`, `waybackTimestamp` | Only with `checkWayback` and a `dead` / `soft_dead` verdict |

SEO fields are filled only when `checkSeo` is on and the final response provides them.

The default **Overview** view of the dataset shows the URL, status, verdict, `verdictReason` and `waybackAvailable` next to the main fields; all other fields are in the full dataset.

### Verdict: is the link really alive?

Every row has a `verdict` and a short `verdictReason`. A plain status code is not enough: many dead links still answer `200`, and many live sites answer `403` to automated tools.

| `verdict` | Meaning | Rule |
|---|---|---|
| `alive` | The page works | 2xx (or a normal redirect that ends in 2xx) and none of the soft-dead signs below |
| `soft_dead` | Answers `200` but the content is gone | The page `<title>` or the first visible text (first ~8 KB) says 404 / "not found" / "doesn't exist" / "no longer available"; **or** the URL redirected to the **home page (`/`) of a different domain** (`www.` is ignored, and a request for a site root such as `https://old.com/` is not flagged); **or** the final URL's domain is a domain auction / sale / parking service (Sedo, Dan.com, Afternic, HugeDomains, Bodis, ParkingCrew, DropCatch, GoDaddy auctions and similar; only the final URL's domain is checked, never page text) |
| `bot_blocked` | The site refuses automated requests, so the link may be fine | 401, 402, 403 or 429. The checker first retries once with a regular browser User-Agent plus common browser headers (Accept, Accept-Language, Accept-Encoding, Upgrade-Insecure-Requests, Sec-Fetch-\*); `browserUaRetry` is then `true` and the row shows the second attempt. Some sites still refuse the retry. Also a `200` page whose title is a bot check ("Just a moment...", "Checking your browser", ...) |
| `dead` | The link is broken | HTTP 404 or 410, DNS lookup failure, or connection refused |
| `unknown` | Could not be decided | Timeout, 5xx, SSL errors, redirect loops, other HTTP errors |

**Dead vs unknown:** `dead` is used only for evidence that the link is gone for good: HTTP 404 / 410, a DNS lookup failure, or a refused connection. Anything that may be temporary or on our side stays `unknown`: timeouts, 5xx errors, SSL errors, redirect loops, too many redirects, other 4xx codes, and invalid or blocked URLs. Re-check `unknown` rows later before treating them as broken.

**Order of checks:** request errors first, then the status code (404/410 → `dead`, 401/402/403/429 → `bot_blocked` after the browser retry, 5xx → `unknown`), then for successful responses: auction/parking domain, foreign home-page redirect, bot-check title, and finally the 404 / "not found" wording.

Limits: the text check only sees the beginning of the page and common English wording; JavaScript-rendered error pages are not detected. Soft-dead is a strong hint, not proof.

#### Wayback Machine (optional)

Turn on `checkWayback` and every row with verdict `dead` or `soft_dead` gets `waybackAvailable` (true / false, null if the lookup failed or was not needed), `waybackUrl` and `waybackTimestamp` of the closest Internet Archive snapshot. The lookup uses the Internet Archive availability API with the URL you submitted (`inputUrl`). It is off by default. Lookups are made one at a time, at least 1 second apart across the whole run, so a long list of dead links takes longer. When it is on, the run log gets one line such as `Wayback lookups: 4, took 6.5s` (time spent in the API requests, without the waiting between them). Only the existence of a snapshot is reported, not its content. No extra charge.

### Check source links in AI-written text

AI assistants and research agents add source links to what they write, and some of those links do not work. A 2026 study of commercial LLMs and deep research agents found that 5–18% of their citation URLs did not resolve, and 3–13% had no Wayback Machine record at all, so they probably never existed ([Rao et al., 2026](https://arxiv.org/abs/2604.03173)).

Paste the cited URLs with `checkWayback` on, then read each row like this:

| Result | What it usually means | What to do |
|---|---|---|
| `alive` | The page exists | Still check that it says what the text claims. This Actor does not read the content. |
| `dead` / `soft_dead` with `waybackAvailable: true` | The page existed once and is gone now | Link the `waybackUrl` or find a current source. |
| `dead` / `soft_dead` with `waybackAvailable: false` | No archived copy either | Treat it as likely made up and replace it. The Wayback Machine does not have every page, so this is a strong hint, not proof. |
| `bot_blocked` | The site refuses automated requests | Open it in a browser before deciding. |
| `unknown` | Timeout, 5xx or similar | Check again later. |

#### Let an AI agent check its own links (MCP)

Through the Apify MCP server, an agent can call this Actor as a tool and check its links before it hands you a draft. In the same study, giving models a link checker cut their non-resolving citations sharply, to under 1% in their tests.

Add this server to your MCP client. On first use, a browser window opens so you can sign in to Apify:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=ondutylabs/url-status-checker"
    }
  }
}
```

The tool appears as `ondutylabs--url-status-checker`. Ask the agent to run it on every URL it cites with `checkWayback: true`, and to replace links whose verdict is `dead` or `soft_dead`.

### Errors never stop the run

DNS failures, timeouts, SSL errors, redirect loops, too many redirects and blocked addresses are written into that URL's row (`error` + `errorType`). The other URLs continue.

### Pricing

Pay per event: you are charged one `url-checked` event per checked URL (one result row). Rows for URLs that were actually requested are charged even if the request ended in an error such as a DNS failure, timeout, SSL error or redirect loop.

Rows with `errorType` `invalid_url` (malformed URL, unsupported scheme, URL too long) or `blocked` (local, private or metadata addresses that the Actor refuses to request) are free: they are still written to the dataset, but no event is charged. Set a maximum cost per run in the Apify Console and the run stops when it is reached. See the Pricing tab for the current price.

### Limitations

- **No JavaScript rendering.** Canonical, meta robots and hreflang are read from the raw HTML response. Tags that a script adds later are not seen, and JavaScript or meta-refresh redirects are not followed. Only HTTP redirects (3xx) are.
- **Private addresses are blocked.** Requests to private, loopback, link-local and cloud-metadata addresses (for example `127.0.0.1`, `10.x.x.x`, `192.168.x.x`, `169.254.169.254`, `localhost`, `*.internal`) are refused. The check runs on the first URL and on every redirect hop, after DNS resolution. If a hostname resolves to both internal and public addresses (for example a broken IPv6 record such as `fe80::`), the internal ones are discarded and the request goes to a verified public IP only; the connection is pinned to that IP, so no second DNS lookup can redirect it. TLS certificate checks still use the original hostname. A host with no public address at all is blocked. Only `http` and `https` are allowed.
- **Per-host concurrency limit.** Requests to the same host are throttled (default 2 at a time), so a list of many URLs on one site runs slower by design.
- **HTML is read only up to `</head>` or the size limit** (default 128 KB). Signals placed later in the page are not found.
- Only the URLs you provide are requested. The Actor does not crawl links and does not log in to pages.

### FAQ

**Does it follow redirects?** Yes, up to `maxRedirects`, and records every hop with its status code, Location and timing.

**Can it check robots.txt?** No. It reads page-level robots signals (meta robots and X-Robots-Tag), not the robots.txt file.

**Why do I get 403 or 429 for a site that works in my browser?** Some sites answer automated requests differently. The result shows what this checker received.

**Will it request my internal servers?** No. Private and internal addresses are blocked, including when reached through a redirect.

**Is HEAD or GET used?** With `checkSeo` on it uses GET (needed to read the HTML head). With it off it uses HEAD and falls back to GET if the server rejects HEAD. The `method` field shows which was used.

**Is it legal to check any site?** Check that you are allowed to request the sites you submit.

### Development

Run the security tests from the Actor folder (no real network needed for the pinning test):

```
.venv/Scripts/python tests/test_pin_selfcheck.py
.venv/Scripts/python tests/test_ip_pinning.py
.venv/Scripts/python tests/test_verdict.py
```

At startup the Actor verifies that connection pinning to the resolved public IPs works. If the check fails, it logs a warning and uses the strict rule: any host that resolves to an internal address is blocked. `httpx` and `httpcore` are pinned to tested versions in `requirements.txt` because the pinning relies on their internals.

# Actor input Schema

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

http(s) URLs to check. Duplicates are removed. A URL without a scheme gets https://. Private, local and cloud-metadata addresses are blocked.

## `checkSeo` (type: `boolean`):

Also read canonical (HTML and Link header), meta robots, X-Robots-Tag and hreflang. Uses GET and reads only the start of the page (up to </head> or the size limit). When off, a cheaper HEAD request is used (with GET fallback).

## `checkWayback` (type: `boolean`):

When a URL's verdict is dead or soft_dead, look it up in the Internet Archive Wayback Machine and add waybackAvailable, waybackUrl and waybackTimestamp. Lookups are spaced 1 second apart, so large dead-link lists take longer. Only checks whether a snapshot exists, not its content.

## `maxRedirects` (type: `integer`):

Maximum number of redirects to follow per URL. Longer chains are reported as an error.

## `timeoutSecs` (type: `integer`):

Maximum time for each request in the chain.

## `maxHtmlKb` (type: `integer`):

Only used when SEO signals are on. At most this much of the response body is read and parsed.

## `maxConcurrencyPerHost` (type: `integer`):

Requests to the same host are limited to this number at a time, to stay polite and avoid being blocked.

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

Maximum number of requests in flight across all hosts.

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

Custom User-Agent header. Leave empty to use the default identifying string.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "http://github.com",
    "https://apify.com/about"
  ],
  "checkSeo": true,
  "checkWayback": false,
  "maxRedirects": 10,
  "timeoutSecs": 15,
  "maxHtmlKb": 128,
  "maxConcurrencyPerHost": 2,
  "maxConcurrency": 20
}
```

# Actor output Schema

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

No description

# 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 = {
    "urls": [
        "https://example.com",
        "http://github.com",
        "https://apify.com/about"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ondutylabs/url-status-checker").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 = { "urls": [
        "https://example.com",
        "http://github.com",
        "https://apify.com/about",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("ondutylabs/url-status-checker").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 '{
  "urls": [
    "https://example.com",
    "http://github.com",
    "https://apify.com/about"
  ]
}' |
apify call ondutylabs/url-status-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ondutylabs/url-status-checker"
        }
    }
}
```

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/fGqjuZ9g4EhWU3TAF/builds/zQbqPTaCwbbyqWlGL/openapi.json
