# Bulk URL Status & Redirect Chain Checker (`sampon/bulk-url-status-redirect-checker`) Actor

Paste a list of URLs and get one row per URL: final status code, final URL, every redirect hop with its code and Location, loops, timing, canonical and error reason.

- **URL**: https://apify.com/sampon/bulk-url-status-redirect-checker.md
- **Developed by:** [Sampon](https://apify.com/sampon) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **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?

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

## Bulk URL Status & Redirect Chain Checker

Paste a list of URLs and get back one row per URL: where it finally lands, the status code it ends on, and every redirect it passes through on the way, with the code and the `Location` header of each step.

It is meant for the jobs where a browser is too slow and a single-URL checker is too small: checking a site move before and after launch, cleaning up old links in a sitemap or a spreadsheet, finding redirect chains and loops, or confirming that every `http://` address now ends on `https://`.

### What you put in

A list of URLs, one per line. Up to 10,000 per run.

```json
{
  "urls": [
    "http://python.org",
    "https://www.example.com/",
    "https://www.python.org/this-page-does-not-exist-404",
    "http://docs.python.org/3/ https://docs.python.org/3/"
  ]
}
```

Addresses without `http://` or `https://` are checked as `https://`.

**Checking a site move.** Put the URL you expect a page to end on after the old URL, separated by a space, a tab or `->`. Each row then tells you whether the final URL matches (`matchesExpected`). This is the quickest way to test a redirect map: paste the two columns of your old-to-new spreadsheet straight in.

```
http://old.example/about https://new.example/company
http://old.example/blog/post-1 -> https://new.example/articles/post-1
```

Optional settings:

| Setting | What it does |
|---|---|
| `onlyProblems` | Save only the URLs that need attention: errors, 4xx and 5xx, loops, too many redirects, HTTPS to HTTP steps, and expected URLs that don't match. Everything is still checked. |
| `oneRowPerHop` | Save one row for each step of each chain instead of one row per URL. Handy for filtering long chains in a spreadsheet. |
| `method` | `HEAD_THEN_GET` (default) sends a HEAD request and repeats the step with GET only if the server refuses HEAD. `GET` always uses GET. |
| `inspectHtml` | On by default. When a step ends on an HTML page, the first 512 KB are read to follow a meta refresh and report the canonical URL. |
| `maxRedirects` | Stop after this many redirects and flag the chain as too long. Default 10. |
| `timeoutSecs` | Time to wait for each answer. Default 15 seconds. |
| `respectRobotsTxt` | Off by default. See below. |
| `maxConcurrency` | Parallel requests across all sites, at most 4. Default 4. |
| `requestDelayMs` | Minimum gap between two requests to the same host. Default 500 ms. |
| `userAgent` | Replace the default User-Agent if a site answers differently to it. |

### What you get

One row per URL:

```json
{
  "position": 1,
  "inputUrl": "http://python.org",
  "finalUrl": "https://www.python.org/",
  "finalStatus": 200,
  "finalStatusText": "OK",
  "redirectCount": 1,
  "redirectTypes": ["301"],
  "chainText": "http://python.org [301] -> https://www.python.org/ [200]",
  "redirectChain": [
    { "step": 1, "url": "http://python.org", "method": "HEAD", "status": 301, "location": "https://www.python.org/", "redirectType": "301", "timeMs": 616 },
    { "step": 2, "url": "https://www.python.org/", "method": "GET", "status": 200, "location": null, "redirectType": null, "timeMs": 182 }
  ],
  "redirectLoop": false,
  "redirectsToHttps": true,
  "expectedUrl": "https://www.python.org/",
  "matchesExpected": true,
  "responseTimeMs": 1308,
  "contentType": "text/html; charset=utf-8",
  "contentLength": 11345,
  "canonicalUrl": null,
  "errorType": null,
  "errorMessage": null,
  "issues": [],
  "problem": false,
  "requests": 3,
  "checkedAt": "2026-10-10T07:51:59+00:00"
}
```

A few fields need a word of explanation:

- `redirectTypes` lists each redirect as `301`, `302`, `303`, `307`, `308`, `meta-refresh` (an HTML meta refresh tag) or `refresh-header` (a `Refresh` HTTP header).
- `chainText` is the whole chain on one line, ready to paste into a report.
- `responseTimeMs` is the total time of all requests made for that URL. `timeMs` inside each step is the time of that step alone.
- `contentType`, `contentLength` and `canonicalUrl` describe the final page. `canonicalUrl` comes from the page's `<link rel="canonical">` tag or from a `Link` header.
- `errorType` is set when no usable answer came back: `DNS` (the host name does not resolve), `TIMEOUT`, `TLS` (certificate or encryption problem), `CONNECTION_REFUSED`, `CONNECTION_RESET`, `CONNECTION_CLOSED`, `INVALID_URL`, `REDIRECT_LOOP`, `TOO_MANY_REDIRECTS` or `ROBOTS_BLOCKED`. `errorMessage` gives the detail.
- `issues` labels what is worth a look. These mark the row as a `problem`: `ERROR`, `CLIENT_ERROR` (4xx), `SERVER_ERROR` (5xx), `REDIRECT_LOOP`, `TOO_MANY_REDIRECTS`, `REDIRECT_WITHOUT_LOCATION`, `HTTPS_TO_HTTP`, `EXPECTED_MISMATCH`, `ROBOTS_BLOCKED`, `INVALID_URL`. These are for information only: `MULTIPLE_REDIRECTS` (two or more hops), `TEMPORARY_REDIRECT` (a 302, 303, 307 or refresh in the chain), `META_REFRESH`, `CANONICAL_ELSEWHERE` (the canonical URL differs from the final URL).
- `position` is the line number in your input. Rows are saved as checks finish, so sort by `position` to get your original order back.

The dataset has three table views: **URLs** (the overview), **Expected vs final** (for site moves) and **Steps** (for runs with `oneRowPerHop`).

### How it checks

- Redirects are followed one step at a time by the Actor itself, so every hop is recorded rather than only the end result.
- Each step starts with a HEAD request. If the server refuses HEAD, the same step is repeated with GET. When a step ends on an HTML page and `inspectHtml` is on, one GET reads the top of the page for a meta refresh and the canonical tag. Non-HTML files such as PDFs and images are never downloaded.
- Cookies set during a chain are kept for the rest of that chain, the way a browser would. A page that redirects to itself once to set a cookie is therefore not reported as a loop.
- A loop is reported when the chain comes back to an address it has already visited with nothing changed.

### robots.txt

By default robots.txt is **not** consulted. This Actor is a point check of addresses you supply: it makes one request per redirect step for each URL, much like opening the link yourself, and it does not discover or crawl any other pages.

If you prefer, turn on `respectRobotsTxt`. Each site's robots.txt is then read once before the first request, URLs it disallows are skipped and reported with the error `ROBOTS_BLOCKED`, and any crawl delay it sets is applied.

### Price

Free for now. You only pay Apify's usual platform usage for the run. In our test, 30 URLs (20 of them on the same site) took about 32 seconds, which at the default 256 MB memory is well under one cent of usage. A per-URL price may be added later. If that happens, it will be shown on this page before it applies to you.

### Speed and limits

- At most 4 requests run at once, and each host gets at least 500 ms between requests by default. URLs from different hosts are mixed so that this gap costs little time. Many URLs on one single site are the slow case: 1,000 URLs on one site take roughly 15 to 25 minutes with the defaults. If the site is your own, you can lower `requestDelayMs`.
- Redirects made by JavaScript are not followed. Only HTTP redirects, the `Refresh` header and meta refresh tags are.
- Some sites answer automated requests differently from browsers, for example with 403 or a challenge page. The row then shows what the site answered to this checker, which may not be what a visitor sees.
- `contentLength` comes from the `Content-Length` header. When the server does not send one, it is filled in only for HTML pages that were read in full.

This Actor is an independent tool. It is not affiliated with the owners of the websites you check.

# Actor input Schema

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

One URL per line, up to 10,000 per run. Addresses without http:// or https:// are checked as https. To confirm a site move, put the URL you expect it to end on after a space, for example: http://old-site.com/page https://new-site.com/page

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

Keep only rows that end in an error, a 4xx or 5xx code, a redirect loop, too many redirects, an HTTPS to HTTP step, or a final URL that differs from the one you expected. Healthy URLs are still checked but not saved.

## `oneRowPerHop` (type: `boolean`):

Instead of one row per URL, save one row for every step of every chain. Easier to filter in a spreadsheet when chains are long.

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

HEAD first is lighter: the page body is not downloaded. If a server refuses HEAD (codes 400, 403, 405, 406, 501 or a dropped connection), that step is repeated with GET automatically. Choose GET only for servers that answer HEAD differently from GET.

## `inspectHtml` (type: `boolean`):

When a step ends on an HTML page, read its first 512 KB to follow a meta refresh redirect and report the canonical URL. Costs one extra GET for HTML pages when HEAD is used.

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

Stop following a chain after this many redirects and flag it as too long.

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

A step that gets no answer in this time is reported with the error TIMEOUT.

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

Off by default, because this is a point check of URLs you supplied: one request per redirect step, like opening the link yourself. Turn on to read each site's robots.txt first; URLs it disallows are skipped and reported as ROBOTS_BLOCKED, and its crawl delay is applied.

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

How many requests run at the same time across all sites. Capped at 4.

## `requestDelayMs` (type: `integer`):

Minimum time between two requests to the same host. URLs from different hosts are mixed so that this gap costs little time.

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

Leave empty to identify as this checker. Some sites answer differently depending on this header.

## Actor input object example

```json
{
  "urls": [
    "http://python.org",
    "https://www.example.com/",
    "https://www.python.org/this-page-does-not-exist-404",
    "http://docs.python.org/3/ https://docs.python.org/3/"
  ],
  "onlyProblems": false,
  "oneRowPerHop": false,
  "method": "HEAD_THEN_GET",
  "inspectHtml": true,
  "maxRedirects": 10,
  "timeoutSecs": 15,
  "respectRobotsTxt": false,
  "maxConcurrency": 4,
  "requestDelayMs": 500
}
```

# Actor output Schema

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

One row per URL: final status, final URL, redirect chain, issues and error reason.

# 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": [
        "http://python.org",
        "https://www.example.com/",
        "https://www.python.org/this-page-does-not-exist-404",
        "http://docs.python.org/3/ https://docs.python.org/3/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sampon/bulk-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": [
        "http://python.org",
        "https://www.example.com/",
        "https://www.python.org/this-page-does-not-exist-404",
        "http://docs.python.org/3/ https://docs.python.org/3/",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sampon/bulk-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/KG8Wrqhqwutnv1Yd5/builds/I0qjAv2PLGmj0l02V/openapi.json
