Redirect checker: chains, loops and 302s

Follow a live redirect chain hop by hop, find chains, loops and temporary redirects in a crawl, and generate redirect rules from URL pairs.

What it does

Chains and loops

redirects-check follows one URL and lists every hop with its status code and Location. It stops at 10 hops or when a URL repeats, and then reports a loop. In a crawl, internal links that point to a redirecting URL are reported with the page that links to them.

  • Status and Location for every hop
  • HEAD by default, GET on request
  • Loops reported when a URL repeats
  • Hop limit of 10 for the live check

Temporary and non-HTTP redirects

A 302, 303 or 307 where a permanent move is meant is reported as a bad redirect type. Redirects made with a meta refresh or an HTTP Refresh header are reported too, because they are slower and less clear than a server-side 301. Each finding comes with the fix text from the registry.

  • Temporary redirects where a 301 is expected
  • Meta refresh and HTTP Refresh redirects
  • Internal links that should point to the final URL

Generate rules

redirects-generate turns old and new URL pairs into Apache mod_rewrite rules, Apache Redirect lines, Nginx rules, a CSV, a WordPress Redirection CSV, or your own template. It also reports chains and loops inside the list of pairs. It makes no network requests and writes nothing to your server.

  • Offline, no network
  • Apache, Nginx, CSV and WordPress Redirection CSV
  • Custom templates
  • Chains and loops found in the pair list before you deploy

Three steps, one saved scan

  1. Crawl or check one URL

    A crawl records every hop; a single URL is followed live with status and location per hop.

  2. Find chains and loops

    Internal links that point to redirected pages are reported with the page and position that links to them.

  3. Generate the rules

    Turn old and new URL pairs into Apache or Nginx rules, offline, with custom templates.

Checks in this feature

CheckWhat it meansSeverityEvidence
REDIRECT_CHAINMore than one hop before the final URLImportantEvery hop with status
REDIRECT_LOOPThe chain returns to a URL it already visitedCriticalLoop path
BAD_REDIRECT_TYPETemporary 302/307 where a permanent move is meantImportantStatus per hop
INTERNAL_LINK_TO_REDIRECTAn internal link points to a redirecting URLTipSource page, DOM position
META_REFRESH_REDIRECTThe page redirects with a meta refreshImportantMeta tag value
Also in the check registry
HTTP_REFRESH_REDIRECT

One command

bash
spiderhead redirects-check --url http://example.com/old-page

Install first: installation guide. Every command also runs as an MCP tool for AI agents.

What you need

  • One URL for the live chain check
  • A crawl or external crawl exports for site-wide chains and internal links to redirects
  • A list of old and new URL pairs for redirects-generate

Limits

  • The live check follows one URL at a time and stops at 10 hops
  • Site-wide chain findings need a crawl or external crawl exports
  • Generated rules are text you review and deploy yourself
  • It does not test whether the new rules work on your server

Questions

Does it change anything on my site?
No. Checks are read-only requests. Generated redirect rules are text output that you review and deploy yourself.
HEAD or GET: which one does redirects-check use?
HEAD by default, which is lighter. You can ask for GET through the options, for servers that answer HEAD differently.
Which formats can redirects-generate write?
Apache mod_rewrite rules, Apache Redirect lines, Nginx rules, CSV, WordPress Redirection CSV, and a custom template you supply.
Can it find chains inside my list of old and new URLs?
Yes. redirects-generate also reports local chains and loops in the pairs you give it, offline, so you can fix them before the rules go live.
How long a chain does it follow?
The live check stops at 10 hops. Where a URL repeats earlier in the chain, it reports a loop instead of continuing.
Does it find redirects that are not 3xx?
Yes, two kinds. Meta refresh redirects and HTTP Refresh header redirects are reported by the crawl checks, with a suggestion to use a server-side 301.

Try it on your own site