# Check Redirect Chains of URLs Before and After a Site Migration

**Use case:** 

Follow every redirect of a list of URLs and see the final page, each status code (301, 302, 307, 308), the number of hops, loops, HTTP to HTTPS upgrades and total time. Check your old URLs after a site migration or a domain change, so that no page is lost for visitors and Google. $1 per 1,000 URLs.

## Input

```json
{
  "urls": [
    "apify.com",
    "http://github.com",
    "https://www.apify.com/store"
  ]
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "finalUrl": {
    "label": "Final URL",
    "format": "link"
  },
  "finalStatus": {
    "label": "Final status",
    "format": "number"
  },
  "redirectCount": {
    "label": "Redirects",
    "format": "number"
  },
  "statusCodes": {
    "label": "Status codes",
    "format": "array"
  },
  "permanent": {
    "label": "Permanent",
    "format": "boolean"
  },
  "loop": {
    "label": "Loop",
    "format": "boolean"
  },
  "httpsUpgrade": {
    "label": "To HTTPS",
    "format": "boolean"
  },
  "totalTimeMs": {
    "label": "Time (ms)",
    "format": "number"
  },
  "issues": {
    "label": "Issues",
    "format": "array"
  },
  "status": {
    "label": "Status",
    "format": "text"
  },
  "errorMessage": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Redirect Checker: Full Chain, Status Codes, Loops & Timing Actor is ready to run with the inputs already set for "Check Redirect Chains of URLs Before and After a Site Migration". [Sign up or log in](https://console.apify.com/create-task-from-example/jDdH4ugZqTNglAaYS) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Check Redirect Chains of URLs Before and After a Site Migration" task

The Redirect Checker: Full Chain, Status Codes, Loops & Timing Actor will start running based on the input automatically. You can also change all the input fields, like URLs, to match your specific use case.

### 3. Receive the "Check Redirect Chains of URLs Before and After a Site Migration" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, final url, final status, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Check Redirect Chains of URLs Before and After a Site Migration" task via API](https://apify.com/arnaud437/redirect-checker.md).

## FAQ

### What does the redirect chain task return?

The redirect chain task returns, for each URL, the final URL and status, every status code on the way, the number of redirects, loops, HTTPS upgrade, total time and issues.

### How do I check a site migration?

Paste the old URLs of your site in the redirect chain task: each one should end on the right new page with one permanent 301 or 308 redirect.

### How much does checking redirects cost?

Checking redirects with this task costs $1 per 1,000 URLs on the free plan and less on paid Apify plans; error rows are free.

## About this Actor

This example demonstrates how to use [Redirect Checker: Full Chain, Status Codes, Loops & Timing](https://apify.com/arnaud437/redirect-checker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/arnaud437/redirect-checker.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/arnaud437/redirect-checker.md

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`).
