# Migration Redirect Map QA - verify every old URL lands right (`muazah/migration-redirect-qa`) Actor

- **URL**: https://apify.com/muazah/migration-redirect-qa.md
- **Developed by:** [muazah](https://apify.com/muazah) (community)
- **Categories:** SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 mapping checkeds

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

## Migration Redirect Map QA - verify every old URL lands right

**Pricing:** $0.003 per mapping checked (up to 5 redirect hops plus a final-page check per mapping, summary included).

You mapped hundreds of old URLs to new ones for a site migration. Did every rule actually take? This Actor walks your redirect map row by row and gives you a pass/fail receipt for each mapping: follow the chain hop by hop, compare the final landing URL against the expected target, and catch the failures that quietly kill SEO after a migration - wrong destinations, redirect loops, dead ends, temporary 302s where you need permanent 301s, and multi-hop chains that leak link equity.

### What you get per mapping

| Field | Meaning |
| --- | --- |
| `verdict` | `ok`, `wrong_target`, `no_redirect`, `ok_no_redirect`, `old_dead`, `final_dead`, `final_error`, `fetch_error`, or `invalid_row` |
| `chain` | Every hop with HTTP status, in order |
| `hops` | Redirect count - more than 1 is flagged as `multi_hop` |
| `permanent` / `temporary` | 301/308 vs 302/303/307 across the chain; temporary hops raise a `temporary_redirect` warning |
| `final_url` / `final_status` | Where the chain actually lands and its HTTP status |
| `canonical` | The final page's canonical link, plus whether it matches your expected target |
| `noindex` | Whether the final page carries a robots noindex (warning `final_page_noindex`) |
| `warnings` | `temporary_redirect`, `multi_hop`, `final_page_noindex` |

Plus a summary record: valid pairs, pass rate, per-verdict counts, multi-hop and temporary-redirect totals. Export everything to CSV/JSON/Excel.

### Input

An array of old-to-new pairs. Common column names all work: `from`/`to`, `oldUrl`/`newUrl`, `source`/`target`, `old`/`new`.

```json
{
  "mappings": [
    {"from": "https://old-site.com/blog/post-1", "to": "https://new-site.com/articles/post-1"},
    {"from": "https://old-site.com/pricing", "to": "https://new-site.com/plans"}
  ],
  "concurrency": 10,
  "maxRedirects": 5
}
```

### Honest limits

- Timeouts, network blocks and anti-bot pages are reported as `fetch_error`, never as a broken destination - retest those rows before acting on them.
- Canonical and noindex evidence comes from the final landing page only.
- Query-string tracking parameters (utm\_\*, gclid, fbclid) are ignored when comparing targets; other query differences count as different URLs.
- Private and internal addresses are refused by design (SSRF guard).
- One run checks up to 20 hops per mapping (`maxRedirects`); longer chains report an error, not a verdict.

Built for SEOs and agencies running site migrations, domain moves, CMS replatforms and URL-structure overhauls.

# Actor input Schema

## `mappings` (type: `array`):

Old-to-new URL pairs to verify. Accepts from/to, oldUrl/newUrl, source/target, old/new field names.

## `concurrency` (type: `integer`):

How many old URLs to check in parallel.

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

Chains longer than this are reported as too many redirects (error, not a destination verdict).

## Actor input object example

```json
{
  "mappings": [
    {
      "from": "https://example.com/old-page",
      "to": "https://example.com/new-page"
    },
    {
      "from": "https://httpbin.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=301",
      "to": "https://example.com/"
    }
  ],
  "concurrency": 10,
  "maxRedirects": 5
}
```

# Actor output Schema

## `receipts` (type: `string`):

One row per input mapping: verdict, redirect chain, hops, permanent/temporary flags, final-page canonical and noindex evidence, warnings.

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

Aggregate counts: valid pairs, pass rate, per-verdict breakdown, multi-hop and temporary-redirect totals.

# 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 = {
    "mappings": [
        {
            "from": "https://example.com/old-page",
            "to": "https://example.com/new-page"
        },
        {
            "from": "https://httpbin.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=301",
            "to": "https://example.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("muazah/migration-redirect-qa").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 = { "mappings": [
        {
            "from": "https://example.com/old-page",
            "to": "https://example.com/new-page",
        },
        {
            "from": "https://httpbin.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=301",
            "to": "https://example.com/",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("muazah/migration-redirect-qa").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 '{
  "mappings": [
    {
      "from": "https://example.com/old-page",
      "to": "https://example.com/new-page"
    },
    {
      "from": "https://httpbin.org/redirect-to?url=https%3A%2F%2Fexample.com%2F&status_code=301",
      "to": "https://example.com/"
    }
  ]
}' |
apify call muazah/migration-redirect-qa --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muazah/migration-redirect-qa"
        }
    }
}
```

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/fnYiwqzKbJGI80FPU/builds/c1aYVkcf8Vlhy7FUs/openapi.json
