Redirect Generator
Paste old and new addresses, get correct redirect rules for your server, with loops and chains caught.
Works in your browser. Nothing you type is sent to us.
Whole-site rules
Page redirects
One per line: the old path, a space or comma, the new path or full address. Paste a CSV export too. End the old path with * to redirect everything under it; use :splat in the new one to keep the rest.
Written in your browser. Nothing you type is sent to us.
Redirect Generator at a glance
- Price
- Free
- Data sent to us
- None, it runs in your browser
- Sign-up
- Not needed
- Servers
- Apache, Nginx, Netlify, Vercel, Cloudflare
- Codes
- 301, 302, 307, 308
- Input
- Lines or CSV: old path, new address, optional code
How to use Redirect Generator
- Choose the server and the kindPick Apache, Nginx, Netlify, Vercel or Cloudflare, and 301 for a permanent move.
- List the redirectsType the old path and the new address on each line, or open a CSV. Add whole-site rules such as http to https if you need them.
- Copy the rulesRead any warnings, then copy the rules or download the file and put it where the note under it says.
Paste the old path and the new address for each page, one per line or as a CSV, choose the server and the kind of redirect, and copy the rules: RewriteRule lines for an Apache .htaccess with the paths properly escaped and anchored, location blocks for Nginx, a _redirects file for Netlify, a redirects array for vercel.json or a CSV for a Cloudflare bulk redirect list. Tick the whole-site rules for http to https, www or bare domain and trailing slashes. Paths that loop, repeat or chain into another redirect are pointed out before you paste.
How it works
Redirect Generator is a web page that does its work on your own device. The file you choose is opened by your browser, changed there and saved from there; it is never sent to a server, so there is no copy of it anywhere to delete, no queue and no waiting for an upload. Most online tools of this kind send your file to their servers and work on it there, and many keep it for a while. This one does not. There is no account, no watermark and no limit on how often you use it, and the result downloads the moment it is ready.
Straight to one job
.htaccess Redirect Generator · Nginx Redirect Generator
What a redirect does
A redirect tells a browser, and a search engine, that a page has moved: ask for the old address and the server answers with the new one and a status code. 301 means moved for good and passes the old page's search standing to the new one; 302 means temporary, keep the old address in the index. 308 and 307 are the same two with one difference, the browser repeats a form submission with the same method instead of turning it into a plain request, which matters for APIs and rarely for pages. For a site move, old page addresses or a changed structure, 301 is almost always the one to use.
How each server is written
Apache reads rules from an .htaccess file at the site root; the generator writes RewriteRule lines with the old path escaped so dots and other special characters match literally, anchored so /old-page does not also catch /old-page-2. Nginx takes a location block per redirect inside the site's server block, with wildcard redirects as a rewrite. Netlify reads a plain _redirects file in the publish folder, Vercel a redirects array in vercel.json, and Cloudflare imports a CSV into a bulk redirect list. The whole-site rules, http to https, www or bare domain and trailing slashes, are written in each server's own idiom, and where a host does one of them for you the tool says so instead of writing a rule.
Checks before you paste
The list is checked for the mistakes that cause loops and chains: a path redirected to itself, the same old path listed twice (the first rule wins, so the second never fires), and a target that is itself redirected, which sends visitors through two hops; point it at the final address instead. Old paths must start with a slash and targets must be a path or a full https address. Paste an export from a spreadsheet or a crawler and the header row is skipped.
What this tool does not do
- It does not test the live site. After uploading, open a few old addresses in a private window and check they land where they should.
- It does not write regular-expression captures beyond the trailing wildcard; for pattern rewrites, edit the generated rule.
- Query strings are passed through by the servers' defaults; the rules do not rewrite them.
What it does
- Apache .htaccess, Nginx, Netlify, Vercel and Cloudflare formats
- 301, 302, 307 and 308, for all rules or per line
- Wildcard redirects for whole folders, keeping the rest of the path
- http to https, www or bare domain, trailing slashes
- Loops, duplicates and chains caught, with the line named
- Paste a list or open a CSV export; download the file
- No upload, no account, no sign-up
Questions
Should I use a 301 or a 302 redirect?
301 for a page or site that has moved for good: search engines pass the old page's standing to the new one and update their index. 302 for something temporary, such as a sale page or maintenance, where the old address should stay indexed. 308 and 307 are the same pair for requests that must keep their method, which matters for forms and APIs.
How do I redirect a whole folder?
End the old path with an asterisk and use :splat in the new one: /blog/* to /articles/:splat sends /blog/anything to /articles/anything. The rule is written for each server's own syntax.
Why does the Apache rule look different from Redirect 301?
RewriteRule with an escaped, anchored path matches exactly the page you typed. The simpler Redirect directive matches by prefix, so a rule for /old also catches /old-news and /old/anything, which is rarely what you want.
What is a redirect chain and why does it matter?
When /a redirects to /b and /b redirects to /c, visitors and search engines make two hops. Chains slow the page and dilute the search value passed on. The tool warns when a target is itself redirected; point the first rule at the final address.
Where does the file go?
Apache: the .htaccess at the site root. Nginx: inside the site's server block, then reload. Netlify: a file named _redirects in the publish folder. Vercel: the redirects array in vercel.json. Cloudflare: import the CSV as a bulk redirect list and enable it. The note under the rules says which.
Do the rules keep the query string?
Apache, Nginx and Netlify pass it through by default, and the Cloudflare CSV sets preserve_query_string to true. The rules do not change it.
Can I paste an export from a spreadsheet or crawler?
Yes. Two columns, old and new, separated by a comma, a tab or spaces, with an optional third column for the status code. A header row starting with old, from or source is skipped.
Is it free?
Yes, completely free, with no sign-up.


