Web QA
static-preflight
A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.
Find redirect chains, loops and clashes in a whole rule set, then flatten every chain to one hop before you ship.
npm install redirect-lintredirect-lint is a redirect chain checker that reads the whole list at once. Give it a Netlify or Cloudflare Pages _redirects file, a CSV (including a WordPress Redirection export) or a JSON array, and it reports loops, chains, duplicates, rules that an earlier rule hides, and redirects that shadow pages you actually have.
It can also collapse chains into one hop and write the result back out in any of the three formats. Netlify's @netlify/redirect-parser parses rules but does not check a rule set for loops, chains or clashes; that is the part this package does. It has no dependencies.
npx redirect-lint _redirects --pages dist_redirects (redirects, 10 rules)
Errors (1)
line 6 loop /team → /about/team → /team is a loop, so none of them is served.
Warnings (8)
line 2 chain /pricing-old → /pricing-2025 → /pricing. Served as /pricing-old → /pricing.
line 4 clash /blog/* covers 3 live pages, such as /blog/hello.
line 5 shadowed /blog/hello is never reached: /blog/* (line 4) matches the same paths first on hosts that use the first match.
line 5 clash /blog/hello is a live page. The redirect hides it on hosts that apply redirects first.
line 10 unsupported /search?q=shoes: Query strings in the From are not supported. Matching on query parameters needs the host.
line 11 clash /contact is a live page. The redirect hides it on hosts that apply redirects first.
line 12 unsupported /api/*: 200 rewrites and proxies are not redirects, so they are not checked.
line 13 chain /old-contact → /contact → /contact-us. Served as /old-contact → /contact-us.
1 error, 8 warnings in 10 rules.npx redirect-lint _redirects --flatten --out dist/_redirectsimport { parseRedirects, lint, flatten, toRedirects } from 'redirect-lint';
const { rules, problems: parseProblems } = parseRedirects(text);
const problems = lint(rules, { livePaths: ['/about', '/blog/hello'] });
const { rules: flat } = flatten(rules);
await writeFile('_redirects', toRedirects(flat));redirect-lint <file> [--format csv|redirects|json] [--pages <dir>] [--flatten [--out <file>]] [--json]Run npx redirect-lint _redirects. Every chain is reported with the path it takes and the single hop it could be, and a loop is an error that makes the command exit 1. Add --flatten --out to write the cleaned-up rules.
Yes. It reads CSV as from,to,status[,note], with or without a header, semicolon or tab delimited, or a WordPress Redirection export. A CSV file may have 5000 rows by default; change that with --max-rows.
Yes. It parses the _redirects format, including wildcards (/blog/*), placeholders (/shop/:slug) and 410s, and writes it back out. Query-string rules and 200 rewrites are reported as unsupported.
No. It reads your rules, not your live site, so it makes no network requests. That is why it can check a rule set before you deploy it, but it also cannot tell whether a target page exists unless you pass --pages.
Web QA
A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.
Web QA
A fetch-only security headers checker and website scanner: about a hundred security, SEO and speed checks, with a score and a fix hint for each finding.
Author
Saimul Islam is a Forward Deployed Engineer and Solutions Architect. Several of these packages run in production on DeveloperLook, the Bundlewise CRM and Sitessa.