_redirects File Generator
Build, validate, and test redirect rules for Netlify, Cloudflare Pages, and ZeroDeploy. Export a ready-to-use _redirects file.
Redirect Rules
No redirect rules yet. Click "+ Add Rule" or choose a preset to get started.
# Add redirect rules above to generate output Test a URL
_redirects Syntax Reference
Basic Redirect
/old-page /new-page 301 Permanently redirect /old-page to /new-page. Status 301 tells search engines the move is permanent.
Named Parameters
/blog/:slug /posts/:slug 301 Capture a URL segment with :name and reuse it in the destination. Matches a single path segment.
Wildcards (Splat)
/docs/* /documentation/:splat 301 Capture everything after * and reference it as :splat. Matches any number of path segments.
Rewrites (Proxy)
/api/* https://api.example.com/:splat 200 Status 200 rewrites the request without changing the URL. The user sees /api/data but the content comes from the external URL.
SPA Fallback
/* /index.html 200 Serve /index.html for all routes. Essential for single-page apps with client-side routing. Place this rule last.
Force Flag (Netlify)
/* /index.html 200! The ! after the status forces the redirect even when a static file exists. Netlify-only feature.
Platform Comparison
| Feature | Netlify | Cloudflare Pages | ZeroDeploy | Vercel |
|---|---|---|---|---|
| File format | _redirects | _redirects | _redirects | vercel.json |
| Status codes | 200, 301, 302, 303, 307, 308, 404 | 200, 301, 302, 303, 307, 308 | 200, 301, 302, 307, 308 | 301, 302, 307, 308 |
Wildcards (*) | Yes (:splat) | Yes (:splat) | Yes (:splat) | :path* syntax |
| Named params | Yes (:name) | Yes (:name) | Yes (:name) | Yes (:name) |
Force flag (!) | Yes | No (always forces) | Yes | N/A (always forces) |
| Rewrite to external URL | Yes (status 200) | No (relative paths only) | Yes (status 200) | Via rewrites in vercel.json |
| Max rules | ~10,000 | 2,000 static + 100 dynamic | 50 (free) / 100 (pro) | 2,048 |
| Conditions | Country, Language, Cookie, Role | None | None | has/missing (header, cookie, query) |
Deploy your site with redirects built in
ZeroDeploy supports _redirects files natively. Deploy your static site in seconds with redirects, forms, and analytics included.