Redirect map generator.
Paste old and new address pairs, one per line, and the tool writes redirect rules for an Apache .htaccess file, nginx, and a Cloudflare _redirects file. It flags loops, chains, duplicates, and addresses that redirect to themselves before you deploy. Choose 301 for a permanent move or 302 for a temporary one.
One pair per line: the old address, then the new one. Separate them with a comma, a tab, or an arrow (->).
Optional. Full addresses on this site are read as paths.
Each old address is matched exactly. Add the rules to the top of the file, test a few old addresses, and keep a backup of the file you replace.
This tool runs in your browser. Nothing you enter is sent anywhere or stored.
How to use it
- Paste your pairs Write the old address, a comma, then the new address, one pair per line. Paths such as /old-page work, and so do full addresses.
- Add your site address Fill in your domain so full addresses on your own site are read as paths, then pick 301 or 302.
- Review what was flagged Loops are left out, chains can be flattened to the final address, and a repeated old address keeps its first rule.
- Copy the file for your server Switch between Apache, nginx, and Cloudflare, then copy the output or download it.
Why it matters
A redirect map is the list that connects each old address to its replacement when a site moves, a page is renamed, or sections are merged. Without one, old links and bookmarks land on error pages and the pages lose the links that pointed at them. Google reads a permanent redirect as a signal that the new address should be the one shown in search, and a temporary redirect as a signal to keep showing the old one.
Chains and loops cause the quiet damage. A chain is an old address that redirects to a page that redirects again, and every hop adds delay for visitors, so point each old address straight at its final destination. A loop sends a request in circles until the browser gives up. The tool finds both. It also keeps the first rule when the same old address appears twice with different targets, which is how servers read the file as well.
The 3 formats differ in what they can match. Apache and nginx can match on a query string or a host. Cloudflare's _redirects file cannot, and its documentation sets a limit of 2,000 static and 100 dynamic redirects per file, so the tool skips those lines in that format and tells you. Test a handful of old addresses after you deploy, and keep the redirects for as long as the old addresses still get traffic or links.
Sources
Questions
Should I use 301 or 302?
Use 301 when the move is permanent and the old address should not come back. Use 302 when it is temporary. Google treats the two differently in search results.
How long should I keep redirects?
For as long as the old addresses still get visits or links. Removing them early turns those visits into error pages.
Does the tool handle wildcards or patterns?
No. Each old address is listed on its own, so every rule matches 1 page. Pattern rules for whole folders are easy to get wrong, so write those by hand and test them.
Why does the trailing slash option add 2 rules?
Servers can treat /page and /page/ as different addresses. With the option on, both are covered.
Where does the nginx output go?
Inside the server block of your site configuration. Reload nginx after you save, and test a few old addresses.
Keep going
Read the Doily guides for step-by-step playbooks. To track results over time, see Doily's SEO tools.