100% Client-Side Pre-Deploy Redirects Simulator
Redirects Tester Online — Pre-Deploy Simulator
Test redirect rules before deploy across vercel.json, next.config.js, and Cloudflare Pages _redirects. Trace path-to-regexp matches, multi-hop loops, and bulk URLs locally.
https://example.com/articles/2026/edge-routing?utm_source=hn
Evaluation Trace
Hop-by-Hop & Exact Rule Priority Breakdown
Rule #1 (redirect) /old-post
Skipped: path "/blog/2026/edge-routing" did not match "/old-post"
Rule #2 (redirect) /blog/:slug*
Matched Rule #2: 301 redirect -> https://example.com/articles/2026/edge-routing?utm_source=hn
Pre-Deploy Technical Guide
Test Redirect Rules Before Deploy — Loops, Priority & Privacy
Validate edge routing locally with a dedicated redirects tester online. Inspect rule order, has/missing conditions, and platform limits across Vercel, Next.js, and Cloudflare.
10-Hop Infinite Loop Detector
Built-in redirect loop checker online traces multi-hop chains across paths and hosts, halting cycles and highlighting offending lines.
Exact Rule Priority Trace
Inspect which rule matched and why earlier rules skipped due to path-to-regexp mismatches, headers, cookies, or host filters.
Bulk URL Matrix & CSV Export
Audit legacy URL batches during migrations, check final status codes and hop counts, and export CSV or Markdown reports.
Workflow
How Pre-Deploy Redirect Testing Works
Broken edge rules rarely fail CI builds—they ship quietly and trigger 404s, dropped query parameters, or production redirect loops. A pre-deploy redirects simulator verifies every hop before you push.
- 1
Load or Paste Your Edge Config
Paste
vercel.json,next.config.js, or_redirects, or jump directly to the vercel.json redirects tester online or Cloudflare Pages _redirects tester. - 2
Configure Request Context
Supply custom hosts, headers, cookies, query strings,
basePath, andtrailingSlashtoggles to evaluatehasandmissingpredicates accurately. - 3
Trace path-to-regexp Captures
Our path-to-regexp redirect tester compiles segments (
:slug,:path*,:id(\d+)) and Cloudflare splats (* -> :splat), showing matched captures and why prior rules skipped. - 4
Batch Audit & Migrate Formats
Run bulk URL matrices with CSV/Markdown export, or translate stacks with the Vercel to Cloudflare redirects converter.
Static Linting & Cycle Detection
Catching Infinite Loops, Shadowed Rules & Edge Traps
Syntax checks miss logical routing bugs. When you test redirect rules before deploy, combine multi-hop execution tracing with rule-order linting across phases.
Cycle Analysis
10-Hop Redirect Loop Checker Online
RedirectsTester follows chained redirects up to 10 hops, tracking normalized origin + pathname + search signatures. When a route revisits any prior state, tracing halts and highlights every line in the cycle.
Our vercel.json rewrites simulator also separates browser redirects (301/302/307/308) from internal 200 rewrites that terminate on first match.
/old-pricing -> /pricing (308)
/pricing -> /plans (307)
/plans -> /old-pricing (308 Loop Detected at Hop 3)Priority Linting
Shadowed Catch-Alls & Platform Quotas
Routers evaluate rules top-down per phase. Placing /(.*) or /* above specific paths shadows rules underneath. The vercel.json validator online and Next.js/Cloudflare linters flag shadowed routes, duplicates, and conflicting permanent/statusCode fields.
On Cloudflare Pages, static rules below dynamic lines consume the 100-dynamic quota—audited inside our Cloudflare Pages _redirects tester.
# Shadowing trap: Rule 2 is unreachable
/* /maintenance 302
/old-about /about 301 # Warning: shadowed by Rule 1HTTP Semantics
Status Codes: 301 vs 308 vs 307 vs 302 vs 200 Rewrites
Choosing the wrong code causes sticky browser cache errors or breaks POST webhooks. Compare how Vercel, next.config.js redirects tester, and Cloudflare handle each status.
Status Code Matrix
Redirect & Rewrite Behavior Across Edge Platforms
| Status | Meaning | Method Preserved | Caching & Platform Notes |
|---|---|---|---|
| 301 | Moved Permanently | No (POST → GET) | Cached by browsers/CDNs. Use explicit statusCode: 301 on Vercel/Next.js or 301 in _redirects. |
| 308 | Permanent Redirect | Yes (strict) | Default in vercel.json and next.config.js when permanent: true (or omitted on Vercel). |
| 302 | Found (Temporary) | No (POST → GET) | Default when status is omitted in Cloudflare _redirects. Safe for temporary routing. |
| 307 | Temporary Redirect | Yes (strict) | Issued by permanent: false in vercel.json and Next.js. Preserves POST bodies. |
| 200 | Internal Rewrite | Yes (proxy) | Serves destination content while keeping the browser URL unchanged and ending hop chains. |
Zero-Trust Architecture
Why 100% Client-Side Privacy Matters for Edge Configs
Routing configs often expose unreleased slugs, internal origins, preview headers, and session cookie keys that should never enter remote SaaS logs.
Local TypeScript Engine & Zero-eval() JS Parser
All parsing runs locally in browser memory via TypeScript and path-to-regexp. For next.config.js and .mjs, our recursive-descent parser extracts redirects() and phased rewrites() statically without eval().
Hash-Fragment Sharing (#s=) & Zero Storage
No accounts, databases, or config telemetry exist. Clicking Share serializes state solely into the #s=... URL hash fragment, which browsers never send over HTTP.
Syntax Reference
Patterns, Status Codes & Matching Semantics
| Pattern / Syntax | Behavior | Example |
|---|---|---|
| vercel.json | path-to-regexp, permanent (308/307), statusCode, has/missing | /blog/:slug* -> /articles/:slug* |
| next.config.js / .mjs | JS redirects() & phased rewrites() (beforeFiles, afterFiles, fallback) | permanent: true -> 308 |
| Cloudflare _redirects | Splats (* -> :splat), :id placeholders, 200/301/302/307/308 | /blog/* /posts/:splat 301 |
| 200 Internal Rewrite | Proxies destination content without changing the browser URL | /rss -> /api/feed.xml (200) |
FAQ
Common Questions & Edge Cases
Is anything uploaded when I paste proprietary routes or headers?
No. RedirectsTester is a 100% client-side redirects tester online using pure TypeScript and path-to-regexp. Your configs, URLs, and headers stay strictly in browser memory.
How does the redirect loop checker online detect infinite loops?
It traces chained hops up to 10 steps, normalizing origin, pathname, and query signatures to catch self-redirects and multi-hop cycles and highlight offending lines.
Can I use this as a vercel.json validator online and Next.js tester?
Yes. Switch tabs above or use our dedicated vercel.json redirects tester online and next.config.js redirects tester tools.
What is the difference between 308/307 and 301/302 redirects?
308 (Permanent) and 307 (Temporary) preserve the HTTP method (e.g., POST), whereas 301/302 may downgrade POST to GET. Vercel and Next.js default permanent: true to 308.
How do shareable simulation links work without a backend?
Clicking Share encodes your config and context into a URL hash fragment (#s=...). Hash fragments are never transmitted to HTTP servers.
More Tools on RedirectsTester
Dedicated Format Simulators & Converters
vercel.json Redirects Tester
Validate vercel.json redirects & rewrites with has/missing host, header, cookie & query rules.
NEXT.JSnext.config.js Redirects Tester
Test redirects(), beforeFiles/afterFiles/fallback rewrites, basePath & regex params.
CLOUDFLARECloudflare _redirects Tester
Simulate splats, placeholders, 200 rewrites & catch static-after-dynamic limits.
CONVERTERVercel → Cloudflare Converter
Convert vercel.json to _redirects with auto-sorting and unsupported has warnings.