Redirect Generator
Generate 301, 302, 307 and 308 redirect rules for Apache .htaccess, Nginx, Netlify _redirects and Vercel vercel.json — single or in batch.
Generate 301, 302, 307 and 308 redirect rules for Apache .htaccess, Nginx, Netlify _redirects and Vercel vercel.json — single or in batch.
Redirect Generator writes redirect rules for four common platforms: Apache .htaccess (mod_rewrite), Nginx, Netlify _redirects and Vercel vercel.json. Enter an old path or URL and its new destination, choose 301, 302, 307 or 308, and copy or download the code for the platform you use.
Batch mode accepts one redirect per line, skips invalid lines with a line-specific explanation, and still generates all valid ones. Where a platform does not support a choice — for example Netlify’s documentation lists 301 and 302 but not 307 for redirects — the tool says so instead of producing a rule that would fail. It only generates text; nothing is live until you deploy the code to your own hosting.
No. It only generates configuration text. A redirect works only after you add the code to your own server or hosting configuration and deploy it.
301 and 308 are permanent; 302 and 307 are temporary. 307 and 308 also require browsers to keep the original request method (for example POST), while 301 and 302 may change it to GET.
Netlify’s _redirects documentation lists 301 and 302 for redirects and states that 307 is currently unsupported, so the tool asks you to choose 301 or 302 for Netlify.
For Apache and Nginx it keeps parameters such as ?ref=abc when redirecting. Netlify (for 301/302) and Vercel pass query strings through automatically, so the setting does not change their output.
No. These rules match on the path only, so the old value cannot contain ?query or #fragment. The new value can include a query string.
One redirect per line: old value, new value and an optional status, separated by spaces, tabs or a comma. Lines starting with # and blank lines are ignored.