Tool guide
About this tool.
- A redirect tells a browser or crawler that a URL has moved. Every server has its own syntax for it: nginx uses location blocks with return, Apache uses Redirect and RedirectMatch in .htaccess, Netlify and Cloudflare Pages read a _redirects file, and Vercel reads a redirects array in vercel.json.
- The status code carries the meaning. 301 and 308 are permanent moves that search engines transfer ranking to, while 302 and 307 are temporary. 307 and 308 also keep the request method, which matters for POST requests.
- A wildcard rule matches a whole section of a site. A from ending in /* captures the rest of the path, and the target refers to it with :splat, which the tool writes as $1 for nginx and Apache and as :path* for Vercel.
- Write one rule per line as from to [status], separated by spaces, tabs, a comma, -> or →. The from is a path starting with /, optionally ending in /*; the to is a path or an absolute http or https URL. Without a status the Default status field applies.
- The tool reports a from that redirects to itself as a high finding, a duplicate from as medium (the first rule wins), a loop of any length and a wildcard that matches its own target as high, a chain where one target is another rule's from as low, a $ in a target as medium, and a status that differs from the default as info.
- Use it when moving a site or restructuring URLs, then paste the output into the server config. Use URL Parse to inspect an address, HTTP Status Codes to compare codes and robots.txt Generator & Tester to keep crawlers off retired paths.
Choose the Target server and the Default status.
Enter one rule per line as from to [status]. Use /* at the end of from and :splat in to for a wildcard.
The summary counts the rules and findings such as loops, duplicates and chains.
Copy or download the generated file. Blank lines and lines starting with # are ignored.
- /old /new → RedirectMatch 301 ^/old$ /new on Apache, /old /new 301 on Netlify.
- /blog/* /articles/:splat 302 → location ~ ^/blog/(.*)$ { return 302 /articles/$1; } on nginx.
- /gone -> https://other.example/x 308 → permanent: true in vercel.json.
- /docs/* /help/$1 → $1 is read as :splat and written for each target.
- /a /b and /b /c → a chain finding suggesting /a /c.
- /a /a → a high finding for a redirect loop.
- The input accepts at most 10,000 non-blank lines of at most 2,048 characters each.
- A from must start with / and may only use * as a trailing /*. Query strings and other regex characters are rejected with the line number.
- A to is a path or an absolute http(s) URL; :splat and $1 both stand for the wildcard part.
- A to that uses a wildcard needs a from ending in /*.
- Values containing semicolons, braces or double quotes are rejected so no extra syntax can reach the nginx or Apache output.
- Every target matches the path exactly, and /* at the end of from is the only prefix form.
- Chains are detected one hop deep, and later duplicates of a from are dropped.
- Nothing is sent anywhere; the rules are generated in the browser.