# URL Status & Redirect Chain Checker for SEO Migrations (`cardine-labs/url-status-redirect-checker`) Actor

URL status and redirect chain checker for SEO migrations: every hop with status and latency, loops, long chains, 302 vs 301, http to https, canonical, and an old -> new redirect map validated against the real final URL. URL lists or sitemaps.

- **URL**: https://apify.com/cardine-labs/url-status-redirect-checker.md
- **Developed by:** [Cardine Labs](https://apify.com/cardine-labs) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## URL Status & Redirect Chain Checker for SEO Migrations

Check the HTTP status and the complete redirect chain of thousands of URLs, and validate a site migration in one run. The Actor follows every redirect itself, hop by hop, so you see each status code, Location header and response time. It flags loops, long chains, temporary redirects used for permanent moves, HTTPS downgrades and host changes, reads the canonical URL of the final page, and compares the final URL with the target you expected in your old-to-new redirect map.

### What does URL Status & Redirect Chain Checker do?

You give it a list of URLs, a sitemap, a redirect map (old URL -> new URL), or any mix of the three. For each URL it returns one record with the full chain and a verdict: `ok`, `redirect_ok`, `warning` or `error`.

- **Migration mapping validation.** Paste your redirect plan as `old -> new` lines. Every old URL is checked and the real final URL is compared with the expected one, so you find redirects that land on the home page, on a 404 or on the wrong section before Google does.
- **Full hop-by-hop chain.** Redirects are not followed blindly by an HTTP library: each hop is recorded with status, status text, Location, method and latency in milliseconds.
- **SEO problems named clearly.** Redirect loops, chains longer than your threshold, 302/303/307 where a 301/308 belongs, HTTPS to HTTP downgrades, several host changes, 4xx/5xx final pages and canonical tags that point elsewhere each get a stable issue code.
- **Sitemap input.** Point it to `sitemap.xml`, a sitemap index or a `.xml.gz` file to check every listed page. robots.txt of the sitemap host is respected.
- **Polite by design.** A configurable delay between requests to the same host, a clear User-Agent, one retry on 429 that honours Retry-After, and no proxies.
- **Cheap and predictable.** One event per checked URL at $1 per 1,000 URLs.

### Who is it for

- **SEO specialists and agencies** running site migrations, domain changes, HTTPS moves or URL restructures, who need proof that every old URL lands on the right new page with a single 301.
- **Developers and DevOps** who deploy redirect rules (nginx, Apache, Cloudflare, Netlify, Vercel) and want an automated check in CI or after each release.
- **Content and e-commerce teams** that retire products or articles and want to catch 404s and redirect chains in their sitemap.
- **Marketing teams** that check campaign links, short links and QR code destinations before launch.
- **Site reliability teams** that monitor a list of critical URLs on a schedule.

### How to use it, step by step

1. Open the Actor in the Apify Console and click **Try for free** (or **Start**).
2. In **URLs to check**, paste your URLs one per line, or upload a text or CSV file.
3. For a migration, paste your plan in **Expected redirects (old -> new)**, one rule per line, for example `https://old.example.com/shoes -> https://www.example.com/c/shoes`. You do not need to repeat those old URLs in the URL list.
4. Optional: add a **Sitemap URL** to check all pages listed in it, and set **Max URLs from the sitemap**.
5. Optional: change **Warn when a chain has more redirects than** (default 1) and the **Delay between requests to the same host**.
6. Click **Start**. Six URLs finish in a few seconds.
7. Open the **Output** tab. The **Status and redirects** view shows verdict, status chain (for example `301 -> 200`), final URL and whether it matches the expected target. Filter on `verdict = error` and export to CSV or Excel for your developers.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | array | - | URLs to check (`[{ "url": "..." }]` or plain strings). URLs without a scheme get `https://`. |
| `redirectMap` | array of strings | `[]` | Lines `old -> new` (also `=>`, comma, semicolon or tab). Old URLs are added to the check list. |
| `sitemapUrl` | string | - | XML sitemap, sitemap index or `.xml.gz`. |
| `maxSitemapUrls` | integer | `500` | Limit on URLs taken from the sitemap. |
| `maxRedirects` | integer | `10` | Stop after this many redirects and report `too_many_redirects`. |
| `chainWarningThreshold` | integer | `1` | Chains with more redirects get `long_chain`. |
| `method` | string | `GET` | `GET`, `HEAD`, or `auto` (HEAD, then GET when HEAD returns an error). |
| `checkCanonical` | boolean | `true` | Read up to 512 KB of the final HTML page for `rel=canonical`. |
| `onlyProblems` | boolean | `false` | Save and charge only URLs with warnings or errors. |
| `perHostDelayMs` | integer | `500` | Minimum delay between two requests to the same host. |
| `maxConcurrency` | integer | `5` | URLs checked in parallel. |
| `timeoutSecs` | integer | `15` | Timeout per request. |
| `maxUrls` | integer | `5000` | Hard limit per run; also your maximum cost. |

At least one of `urls`, `redirectMap` or `sitemapUrl` is needed. Example:

```json
{
  "urls": [{ "url": "http://github.com" }, { "url": "https://apify.com/store" }],
  "redirectMap": [
    "https://google.com -> https://www.google.com/",
    "http://apify.com -> https://apify.com/store"
  ],
  "sitemapUrl": "https://crawlee.dev/sitemap.xml",
  "maxSitemapUrls": 50,
  "chainWarningThreshold": 1
}
```

### Output

Real records from a test run on the Apify platform (5 December 2026). A migration rule that does not land where expected:

```json
{
  "url": "http://apify.com/",
  "expectedUrl": "https://apify.com/store",
  "matchesExpected": false,
  "finalUrl": "https://apify.com/",
  "finalStatus": 200,
  "verdict": "error",
  "redirectCount": 1,
  "chainSummary": "301 -> 200",
  "chain": [
    { "url": "http://apify.com/", "status": 301, "statusText": "Moved Permanently", "location": "https://apify.com/", "latencyMs": 4, "method": "GET" },
    { "url": "https://apify.com/", "status": 200, "statusText": "OK", "location": null, "latencyMs": 82, "method": "GET" }
  ],
  "totalLatencyMs": 86,
  "httpsUpgrade": true,
  "finalHostDiffers": false,
  "hostChanges": 0,
  "permanentRedirectsOnly": true,
  "isLoop": false,
  "canonicalUrl": "https://apify.com/",
  "canonicalMatchesFinal": true,
  "issueCodes": ["expected_mismatch", "http_to_https"],
  "issues": [
    { "code": "expected_mismatch", "severity": "error", "message": "Final URL https://apify.com/ differs from the expected target https://apify.com/store." },
    { "code": "http_to_https", "severity": "notice", "message": "HTTP is upgraded to HTTPS." }
  ],
  "checkedAt": "2026-12-05T14:53:22.884Z"
}
```

A correct redirect that matches the plan:

```json
{
  "url": "https://google.com/",
  "expectedUrl": "https://www.google.com/",
  "matchesExpected": true,
  "finalUrl": "https://www.google.com/",
  "finalStatus": 200,
  "verdict": "redirect_ok",
  "redirectCount": 1,
  "chainSummary": "301 -> 200",
  "chain": [
    { "url": "https://google.com/", "status": 301, "statusText": "Moved Permanently", "location": "https://www.google.com/", "latencyMs": 22, "method": "GET" },
    { "url": "https://www.google.com/", "status": 200, "statusText": "OK", "location": null, "latencyMs": 52, "method": "GET" }
  ],
  "finalHostDiffers": true,
  "permanentRedirectsOnly": true,
  "issueCodes": []
}
```

A broken page:

```json
{
  "url": "https://github.com/cardine-labs-this-page-does-not-exist-404",
  "finalStatus": 404,
  "verdict": "error",
  "redirectCount": 0,
  "chainSummary": "404",
  "issueCodes": ["final_not_found"],
  "issues": [{ "code": "final_not_found", "severity": "error", "message": "Final URL returns 404." }]
}
```

**Fields.** `chain` lists every request with `status`, `location` and `latencyMs`; `chainSummary` is the readable status sequence (`LOOP` marks a repeated URL, `ERR` a failed request). `verdict` is `error` if any issue is an error, `warning` if any is a warning, otherwise `redirect_ok` or `ok`. `matchesExpected` is `true`, `false`, or `null` when no expected target was given. `issueCodes` can be: `request_failed`, `redirect_loop`, `too_many_redirects`, `final_not_found`, `final_client_error`, `final_server_error`, `redirect_without_location`, `long_chain`, `temporary_redirect`, `https_downgrade`, `multiple_host_changes`, `unusual_redirect_status`, `canonical_differs`, `expected_mismatch`, `expected_match_trailing_slash` and `http_to_https`. The `SUMMARY` record in the key-value store has verdict counts, the number of mismatches against expected targets, invalid inputs and sitemap notes.

### How much does it cost?

Pay per event: **$0.001 per checked URL ($1 per 1,000 URLs)**. Invalid URLs are not charged; with **Only problems** on, fine URLs are not charged either.

- Validating a 300-rule migration map: **$0.30**
- A 5,000-page sitemap checked weekly (4 runs a month): **$20 per month**, or much less with **Only problems**, which charges only broken or redirected pages.
- 100 campaign links checked before launch: **$0.10**

Platform usage is tiny: the test run with six URLs took about 4 seconds at 256 MB and used $0.0002. The politeness delay per host means a sitemap of one site is checked at roughly two URLs per second; many different hosts run in parallel.

Honest comparison: `onescales/simple-http-status-code-checker` (the most used, 1,705 users) charges $0.30 per URL; `logiover/bulk-url-status-checker` charges $2.50 per 1,000; `automation-lab/http-status-checker` is cheaper at $0.50 per 1,000 plus a start fee, but follows redirects only on request and has no migration map; `khadinakbar/broken-link-checker` charges $1 per 1,000 and focuses on crawling a site for broken links.

### Integrations

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('cardine-labs/url-status-redirect-checker').call({
  redirectMap: ['https://old.example.com/a -> https://www.example.com/a'],
  onlyProblems: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const r of items) console.log(r.url, r.chainSummary, r.finalUrl, r.issueCodes);
```

Python:

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("cardine-labs/url-status-redirect-checker").call(run_input={"sitemapUrl": "https://www.example.com/sitemap.xml"})
for r in client.dataset(run["defaultDatasetId"]).iterate_items():
    if r["verdict"] == "error":
        print(r["url"], r["chainSummary"], r["issueCodes"])
```

- **CI/CD**: call the Actor after a deploy and fail the pipeline when `SUMMARY.verdicts.error` is above zero.
- **Zapier, Make and n8n**: use the Apify "Run Actor" action and send errors to Slack, Teams, email or a ticket.
- **Google Sheets**: keep your redirect plan in a sheet, pass the rows as `redirectMap`, and write results back with the Apify integration.
- **Webhooks and schedules**: schedule a weekly run with **Only problems** on and add a webhook on "Run succeeded".
- **AI agents (MCP)**: call the Actor from Claude, Cursor or other MCP clients through the Apify MCP server or the Cardine Labs MCP servers (Website Audit MCP, Web Data Tools MCP).

### Is it legal?

The Actor sends ordinary HTTP requests to the URLs you provide, like a browser or a search engine would, and records status codes and headers.

- **Source and terms.** You choose the URLs. Check them only on sites you own, manage, or are allowed to test, and respect each site's terms of use.
- **robots.txt and limits.** When it reads a sitemap, the Actor first checks robots.txt of the sitemap host and skips the sitemap if disallowed. URLs you list yourself are requested directly (one request per hop), with a delay between requests to the same host (500 ms by default), one polite retry on 429 honouring Retry-After, a 15-second timeout and an identifying User-Agent. No proxies, no CAPTCHA solving, no login.
- **Personal data.** The output contains URLs, status codes, Location headers, timings and canonical URLs. No page content is stored and no personal data is collected unless you put it in your own URLs. Under the GDPR, the usual basis for checking your own or your clients' sites is legitimate interest (Article 6(1)(f)).
- **No legal judgement.** Issues are technical observations based on HTTP standards and common SEO practice, not legal or compliance statements.

### What this Actor does not do

- It does not crawl a website to discover links; use a sitemap or a crawler such as our Technical SEO Audit Actor for that.
- It does not render JavaScript, so JavaScript and `<meta http-equiv="refresh">` redirects are not followed; only HTTP redirects are.
- It does not use proxies, so pages that block data-center traffic may answer 403 or 429; the result shows exactly what the server returned.
- It reads only the first 512 KB of the final page and only for the canonical tag; it does not check other on-page SEO.
- It does not send cookies, so sites that redirect based on cookies or geolocation may behave differently for real visitors.

### Troubleshooting

- **"No valid URL to check".** Add URLs, redirect-map lines or a sitemap. Lines in the redirect map must contain exactly two URLs; invalid lines are listed in the log and the `SUMMARY`.
- **Many `request_failed` with a timeout.** Increase **Timeout per request** or lower **Parallel URLs**; the server may be slow.
- **403 or 429 on a site that works in your browser.** The site blocks automated traffic or rate-limits it. Increase the per-host delay; this Actor does not bypass protections.
- **`expected_match_trailing_slash` notice.** The final URL differs from your plan only by a trailing slash. Usually fine, but it often means one more redirect than needed.
- **The sitemap returned nothing.** Check the `SUMMARY.sitemapNotes`: the sitemap may be disallowed by robots.txt, return an error or be an HTML page.
- **Empty dataset.** With **Only problems** on and no problems, the dataset is empty by design; the `SUMMARY` still counts all checked URLs.

### FAQ

**How is this different from onescales/simple-http-status-code-checker?** That Actor returns the status and the first redirect destination for $0.30 per URL. This one records the full chain hop by hop, names the SEO problems, validates an old-to-new migration map, accepts sitemaps, and costs $1 per 1,000 URLs.

**How is this different from logiover/bulk-url-status-checker or automation-lab/http-status-checker?** Both report status codes and redirects, but neither compares the final URL with an expected target. Migration validation, canonical checks and named issues per URL are the focus here.

**Why GET by default and not HEAD?** Many servers answer HEAD differently from GET (405, 404 or a different redirect). GET is what browsers and search engines use; the Actor cancels the body download immediately except for the final HTML page when the canonical check is on.

**Why is a 302 a warning?** For a permanent move, search engines may keep the old URL indexed when they see a temporary redirect. If the redirect really is temporary (A/B tests, login pages), you can ignore it.

**Does it follow relative Location headers?** Yes, relative locations are resolved against the current URL, as browsers do.

**Can I check URLs on many domains?** Yes. The per-host delay only applies to requests to the same host, so different domains are checked in parallel.

**Does it need an API key or proxy?** No.

### Other Cardine Labs Actors

- [Technical SEO Audit & Broken Link Checker](https://apify.com/cardine-labs/seo-site-auditor): crawl a site and find broken links, missing tags and redirect problems.
- [Sitemap New Pages Monitor](https://apify.com/cardine-labs/sitemap-new-pages-monitor): get the pages added to a sitemap since the last run.
- [Website Change Monitor](https://apify.com/cardine-labs/website-change-monitor): get alerted when a page changes.
- [Schema Markup Validator](https://apify.com/cardine-labs/schema-markup-validator): check structured data on your pages.
- [Domain & Email DNS Audit](https://apify.com/cardine-labs/domain-email-dns-audit): registration, DNS, SPF, DMARC, DKIM and TLS expiry in one run.

# Actor input Schema

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

URLs to check, one per line. You can also upload a text or CSV file. URLs without a scheme get https://.

## `redirectMap` (type: `array`):

Migration mapping, one rule per line: "old URL -> expected final URL" (also =>, comma, semicolon or tab). Old URLs are added to the check list and the final URL is compared with the expected target. Relative targets like /new-page are resolved against the old URL.

## `sitemapUrl` (type: `string`):

Optional XML sitemap or sitemap index (also .xml.gz). Its URLs are added to the check list. robots.txt of the sitemap host is respected.

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

Limit on URLs taken from the sitemap (and its child sitemaps).

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

Stop following a chain after this many redirects and report too_many_redirects.

## `chainWarningThreshold` (type: `integer`):

Chains with more redirects than this get a long_chain warning. 1 is the usual SEO recommendation (one hop from old to new).

## `method` (type: `string`):

GET is the most faithful (what browsers and search engines do). HEAD is lighter; auto uses HEAD and re-checks with GET when the server answers HEAD with an error.

## `checkCanonical` (type: `boolean`):

Reads up to 512 KB of the final HTML page and reports its rel=canonical, flagging a canonical that differs from the final URL.

## `onlyProblems` (type: `boolean`):

Save only URLs with warnings or errors. Fine URLs are counted in the SUMMARY but not saved or charged. Off by default.

## `perHostDelayMs` (type: `integer`):

Politeness delay per host. Different hosts are checked in parallel.

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

URLs checked at the same time (1-20).

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

A hop that does not answer in time is reported as request_failed.

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

Hard limit on checked URLs. This is also your maximum cost.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "http://github.com"
    },
    {
      "url": "https://google.com"
    }
  ],
  "redirectMap": [
    "https://old.example.com/page -> https://www.example.com/new-page"
  ],
  "sitemapUrl": "https://www.example.com/sitemap.xml",
  "maxSitemapUrls": 500,
  "maxRedirects": 10,
  "chainWarningThreshold": 1,
  "method": "GET",
  "checkCanonical": true,
  "onlyProblems": false,
  "perHostDelayMs": 500,
  "maxConcurrency": 5,
  "timeoutSecs": 15,
  "maxUrls": 5000
}
```

# Actor output Schema

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

One record per URL with the full hop-by-hop chain and issues.

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

Verdict counts, mismatches against expected targets, invalid inputs and sitemap notes.

# 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": [
        {
            "url": "http://github.com"
        },
        {
            "url": "https://apify.com/store"
        },
        {
            "url": "https://github.com/cardine-labs-this-page-does-not-exist-404"
        },
        {
            "url": "http://apify.com"
        },
        {
            "url": "https://google.com"
        },
        {
            "url": "https://www.example.com"
        }
    ],
    "redirectMap": [
        "http://github.com -> https://github.com/",
        "https://google.com -> https://www.google.com/",
        "http://apify.com -> https://apify.com/store"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cardine-labs/url-status-redirect-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": [
        { "url": "http://github.com" },
        { "url": "https://apify.com/store" },
        { "url": "https://github.com/cardine-labs-this-page-does-not-exist-404" },
        { "url": "http://apify.com" },
        { "url": "https://google.com" },
        { "url": "https://www.example.com" },
    ],
    "redirectMap": [
        "http://github.com -> https://github.com/",
        "https://google.com -> https://www.google.com/",
        "http://apify.com -> https://apify.com/store",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("cardine-labs/url-status-redirect-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": [
    {
      "url": "http://github.com"
    },
    {
      "url": "https://apify.com/store"
    },
    {
      "url": "https://github.com/cardine-labs-this-page-does-not-exist-404"
    },
    {
      "url": "http://apify.com"
    },
    {
      "url": "https://google.com"
    },
    {
      "url": "https://www.example.com"
    }
  ],
  "redirectMap": [
    "http://github.com -> https://github.com/",
    "https://google.com -> https://www.google.com/",
    "http://apify.com -> https://apify.com/store"
  ]
}' |
apify call cardine-labs/url-status-redirect-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cardine-labs/url-status-redirect-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/VagaxEOlVFwZ1NHve/builds/diwboDztcEFQRJ7ld/openapi.json
