---
title: "Redirect trace | SEO Skill"
description: "Follow every redirect hop from one URL to its final page and check status codes, loops, chains, canonicals and link safety before updating links."
canonical: "https://seoskill.dev/docs/reports/redirect-trace"
language: "en"
---

# Redirect trace

Trace one URL through every redirect instead of checking only the final response. This makes loops, long chains and a surprising destination hard to miss.

## Install and run the tool

Install the CLI once, then run `seo start` to connect your site and Google data. After setup you can run this tool yourself or ask your agent to run it.

Install the SEO CLI globally.

```
npm i -g seo
```

Run setup after installation.

```
seo start
```

Follow every redirect hop to the final page.

```
seo redirect-trace --url https://example.com/old-page
```

## What the tool gives you

Follow every redirect hop from one URL to its final page and check status codes, loops, chains, canonicals and link safety before updating links.

Best for

A migrated, shortened, or legacy URL behaves unexpectedly.

Needs

Live URL responses

You get

Follow every redirect hop from one URL to its final page and check status codes, loops, chains, canonicals and link safety before updating links.

Use next

Recover broken URLs with search value

Every report follows the same rules for missing data and outside estimates.[See how report data works](https://seoskill.dev/docs/reports#how-report-data-works).

## What you need before you run it

The report uses the information below. Optional sources are only used when you ask for them.

### Live URL responses

Provides each status, location header, hop, final URL, and transport failure.

### Final page evidence

Adds the final response, canonical, robots directives, title, and content type.

## Use a different report for these jobs

These jobs need a different report or a manual review.

[

### You need to find broken or unsuitable destinations across search-visible URLs, not trace one known URL.

Run link recovery. It joins returned Search Console page metrics to fresh response and redirect evidence, then prioritises broken or poorly redirected URLs that still show search value.

Broken link recovery report

](https://seoskill.dev/docs/reports/link-recovery)

### You need to decide which destination is genuinely equivalent to the old page.

No automated report can make that content and business decision. Compare the old purpose, user intent, content, and destination manually. Redirect trace can confirm how each candidate currently resolves, but it cannot prove topical equivalence.

Needs more evidence

## Use the tool with an agent or in code

The command above is enough for most work. These options let an agent, script or application run the same tool with explicit input and structured output.

### CLI

Use the report catalog when an agent, script or CI job needs predictable JSON instead of the normal terminal output. Check the current input first, then run the tool with the validated parameters.

Check the current input before the agent or script runs the tool.

```
seo reports describe redirect-trace --json
```

Once the input is valid, run the tool through the report catalog.

```
seo reports run redirect-trace --params '{"url":"https://example.com/old-page","maxHops":8,"refresh":true}' --json
```

### MCP

An MCP agent follows the same two-step flow. It inspects the current schema, fills the required fields and only then runs the tool.

Ask the MCP server for the current tool input.

```
{
  "id": "redirect-trace"
}
```

Run the tool after the agent has checked and filled the input.

```
{
  "id": "redirect-trace",
  "params": {
    "url": "https://example.com/old-page",
    "maxHops": 8,
    "refresh": true
  }
}
```

### TypeScript

Install the package in a Node 22 project when your application needs to run the tool directly. The result includes the same evidence, warnings and limits returned through the CLI and MCP server.

Add the SEO package to your project.

```
npm install seo
```

Run the tool from your TypeScript application.

```
import { executeReport } from 'seo/mcp'

const result = await executeReport(
  'redirect-trace',
  {
  "url": "https://example.com/old-page",
  "maxHops": 8,
  "refresh": true
},
)

console.log(result)
```

## What to do next

Fix loops, unnecessary hops and destinations that do not match the original URL's purpose. Update internal links to the final URL and trace the path again after deployment.

1.  01Update internal links to the final destination.
2.  02Use link recovery to find other search-visible broken URLs.

## Related reports

[

Find broken URLs and weak redirects that still have Search Console value, then decide which pages to restore, redirect or leave alone using search evidence.

Broken link recovery report

](https://seoskill.dev/docs/reports/link-recovery)[

Audit one URL for technical SEO, metadata, canonicals, schema, links and Search Console queries. See the live evidence before changing the page.

SEO page audit

](https://seoskill.dev/docs/reports/audit-page)[

Check sitemap URL status, redirects and access first. Run the full technical SEO crawl only when you need page content, links, metadata and affected URLs.

Sitemap health check and technical site crawl

](https://seoskill.dev/docs/reports/site-crawl)

## Sources used by this tool

These primary sources define the provider data or search controls used by the result.

-   [Google guidance for redirects](https://developers.google.com/search/docs/crawling-indexing/301-redirects)
-   [Google canonical URL guidance](https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls)
