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.

Runafter install

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.

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

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.

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

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.

Sources used by this tool

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