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.

Presets:
vercel.json3 rules
Try:
301 PERMANENT1 hop
< 1ms local
Resolved Destination URL

https://example.com/articles/2026/edge-routing?utm_source=hn

Evaluation Trace

Hop-by-Hop & Exact Rule Priority Breakdown

2 rule checks
Hop 1https://example.com/blog/2026/edge-routing?utm_source=hn
301 REDIRECT
→https://example.com/articles/2026/edge-routing?utm_source=hn
Captures::slug = 2026/edge-routing
SKIP

Rule #1 (redirect) /old-post

Skipped: path "/blog/2026/edge-routing" did not match "/old-post"

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. 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. 2

    Configure Request Context

    Supply custom hosts, headers, cookies, query strings, basePath, and trailingSlash toggles to evaluate has and missing predicates accurately.

  3. 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. 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 1

HTTP 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

StatusMeaningMethod PreservedCaching & Platform Notes
301Moved PermanentlyNo (POST → GET)Cached by browsers/CDNs. Use explicit statusCode: 301 on Vercel/Next.js or 301 in _redirects.
308Permanent RedirectYes (strict)Default in vercel.json and next.config.js when permanent: true (or omitted on Vercel).
302Found (Temporary)No (POST → GET)Default when status is omitted in Cloudflare _redirects. Safe for temporary routing.
307Temporary RedirectYes (strict)Issued by permanent: false in vercel.json and Next.js. Preserves POST bodies.
200Internal RewriteYes (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 / SyntaxBehaviorExample
vercel.jsonpath-to-regexp, permanent (308/307), statusCode, has/missing
next.config.js / .mjsJS redirects() & phased rewrites() (beforeFiles, afterFiles, fallback)
Cloudflare _redirectsSplats (* -> :splat), :id placeholders, 200/301/302/307/308
200 Internal RewriteProxies destination content without changing the browser URL

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.