A site migration usually comes with a spreadsheet: old URLs in one column, new URLs in the next. You want that turned into redirect rules for your server. Searching for an htaccess redirect generator finds tools that sound the same but do different things, so we tried five of them with a small test list of old and new paths, including one loop and one chain.
The short answer
- Two of the five (dnschecker.org and Daniel Morell's generator) only write domain-wide rules such as www, https and trailing slashes. They cannot turn a list of old and new pages into redirects.
- Salt's generator and 301-redirect.online are built for lists, and both write Apache rules.
- Ours writes six formats and checks for loops, chains and duplicates. We built it, so read our limits below.
What to look for
- ✓It takes a list of old and new URLs, ideally pasted from a spreadsheet.
- ✓It writes rules for the place your site actually runs: Apache, nginx, a static host or a CDN.
- ✓It warns about loops, redirect chains, duplicates and bad lines before you deploy.
- ✓It handles old URLs that carry a query string.
- ✓It works without sign-up and does not send your URL list anywhere.
1. Salt.agency bulk redirect generator
What the page says: it generates thousands of Apache .htaccess 301 rules, has been tested with up to 100,000 redirects, takes tab-separated pairs (what you get by copying two columns from Excel), offers a 301 or Rewrite output type and an option to show comments, and links to MIT-licensed code you can run yourself.
What happened when we tried: we pasted four tab-separated pairs of relative paths on two attempts, once by setting the box's value and once by typing, and the output box stayed empty both times. It may need a different input format or interaction than we used, so we rate it untestable on our sample rather than broken. The cookie notice on that page treats closing it as consent, so we left it alone.
Strengths: designed for very large lists, open-source code you can run locally. Shortfalls from the page: Apache only, and nothing on it mentions loop or chain checks.
2. 301-redirect.online (htaccess rewrite generator)
What we saw: a prefilled sample of old and new URLs, a choice of comma, space or semicolon as the separator, a choice between a 301, a 302 and an internal rewrite, a setting for reproducing query strings, and a Generate button that fills an Apache mod_rewrite rule box. The page also links to separate generators for pure PHP and AWS S3.
We read the page and its prefilled example and did not run our own list through it, so we have not tested its output. Strengths: separator choices and query-string handling. Shortfalls: the generators are for Apache, PHP and S3 only, so there is nothing for nginx, Netlify, Vercel or Cloudflare.
3. Daniel Morell's .htaccess redirect generator
What happened: the page loaded without sign-in and offers domain settings (https or http, subdomain, domain), three trailing-slash settings, and advanced options including an HSTS-compatible two-step redirect, www to root, 301 or 302, and a proxy or load-balancer https redirect. There is no place to enter old and new page URLs, so it cannot do a list.
Strengths: a thoughtful set of rules for forcing https, www and trailing-slash conventions in one redirect, which is a different job. Shortfall for a migration: no page-to-page redirects.
4. dnschecker.org HTACCESS Redirect Generator
What happened: the page loaded without sign-in. It has one URL box and two options, redirect www to non-www or non-www to www, and a Get Redirect Code button. Its own description says it creates a 301 redirect between the www and non-www versions of a site. We did not run a list through it because it has no way to take one.
Strengths: very simple for the one job it does. Shortfall: it does not map old pages to new pages.
5. Our Bulk redirect generator (we built this one)
You paste or open a CSV of old and new URLs (comma, tab or arrow, with an optional third column for 301, 302, 307 or 308) and choose Apache, nginx, Netlify, Vercel, Cloudflare Bulk Redirects or IIS. It removes self-redirects, duplicates and loops, can point chains straight at the final page, lists every problem with its line number, and handles query-string sources where the platform allows. It runs in your browser, and you can copy or download the file.
Where it falls short: we wrote the output formats from each platform's documented syntax, but we have not run the generated files on live Apache, nginx, Netlify, Vercel or IIS servers, so test on a staging copy. It does exact page matching only, with no wildcard or pattern rules. Cloudflare's Bulk Redirects do not accept query strings in source URLs, so those lines are left out of that file. And Salt's tool has been tested on much larger lists than ours has.
Try it: Bulk redirect generator.
Which should you use?
- A list for Apache, and nothing else
Salt's generator or 301-redirect.online, whichever works with your list format. - A list for nginx, a static host, Cloudflare or IIS, or you want loop and chain checks
Ours. - Forcing https, www or trailing slashes across the whole site
Daniel Morell's generator, or dnschecker.org for the plain www choice.
Sources we used
- Bulk redirect generator (tried with a sample list) — SALT.agency
- Htaccess Rewrite Generator (read, not run with our list) — 301-redirect.online
- .htaccess Redirect Generator — Daniel Morell
- HTACCESS Redirect Generator — DNS Checker
- CSV file format for Bulk Redirects — Cloudflare
- Redirects — Vercel