vercel.json Simulator
vercel.json Redirects Tester Online & Rewrites Simulator
Online vercel.json validator and rewrites simulator—test path-to-regexp wildcards, permanent (308/307) vs statusCode, and conditional has/missing matchers 100% 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
vercel.json Reference
Debug Vercel Routing Conditions & Wildcards Before Deploying
Run a fast vercel.json redirects tester online in your browser. Inspect redirects and rewrites, named captures, and shadowed catch-alls with zero uploads.
has & missing Conditions
Test host, header, cookie, and query matchers—including named regex captures interpolated into destination.
statusCode vs permanent
Resolves permanent: true (308), permanent: false (307), omitted defaults (308), and conflicting statusCode rules.
path-to-regexp Linter
Catches missing leading slashes, shadowed routes under /(.*), duplicate sources, and root /:path* edge cases.
Execution & Conditions
How vercel.json Redirects & has/missing Conditions Evaluate
Vercel runs redirects before filesystem routes and rewrites via path-to-regexp. Use this vercel has condition redirect tester to verify host, header, cookie, and query matchers locally.
Rule Precedence
has/missing Captures & Quotas
has and missing clauses support regex captures such as (?<subDomain>www|app) interpolated into destination. This vercel.json validator online also checks Hobby (1,024) and Pro (2,048) limits and shadowed catch-alls.
Compare with our next.config.js redirects tester or migrate rules using the vercel.json to Cloudflare redirects converter.
{
"source": "/:path+",
"has": [{ "type": "host", "value": "(?<subDomain>www|app)\\.example\\.com" }],
"destination": "https://example.com/:subDomain/:path+",
"permanent": true
}Proxy & Status Rules
Rewrites vs Redirect Hop Chains
The vercel.json rewrites simulator resolves internal 200 proxies immediately without modifying the address bar, while redirects trace up to 10 hops to expose loops.
Need multi-platform comparisons? Open the redirects tester online.
"rewrites": [
{ "source": "/api/v1/users/:id(\\d+)", "destination": "/api/v2/members?id=:id" }
]Syntax Reference
Patterns, Status Codes & Matching Semantics
| Pattern / Syntax | Behavior | Example |
|---|---|---|
| :slug | Matches a single non-empty path segment | /blog/:slug -> /posts/:slug |
| :path* | Matches zero or more trailing segments | /docs/:path* -> /guides/:path* |
| :id(\\d+) | Named parameter constrained by inline regex | /users/:id(\\d+) -> /u/:id |
| has / missing | Host, header, cookie, or query clauses with regex captures | { "type": "host", "value": "www.example.com" } |
FAQ
Common Questions & Edge Cases
What happens if I omit permanent and statusCode in vercel.json?
Vercel defaults permanent to true, issuing a 308 Permanent Redirect unless statusCode or permanent: false (307) is set.
Why does /:path* behave differently on root "/" in Vercel?
Pattern /:path* can skip bare / in edge matching. Add an explicit "source": "/" rule alongside "/:path+" to cover root traffic.
Can I set both permanent and statusCode on one rule?
No, Vercel treats them as mutually exclusive. This vercel.json validator online warns whenever both appear on the same entry.
Do vercel.json rewrites change the browser URL?
No. Rewrites return an internal 200 response from the destination while preserving the original URL in the address bar.
More Tools on RedirectsTester
Dedicated Format Simulators & Converters
Vercel → Cloudflare
Convert vercel.json directly into sorted Cloudflare Pages _redirects.
NEXT.JSnext.config.js Tester
Simulate JS async redirects() and phased rewrites() in next.config.mjs.
CLOUDFLARECloudflare _redirects
Test Cloudflare Pages splats, placeholders, and static-before-dynamic limits.
ALL-IN-ONEUniversal Simulator
Compare rules across Vercel, Next.js, and Cloudflare tabs side by side.