Summary
The redirect generator turns a list of old and new addresses into redirect rules for Apache, Nginx, IIS, Cloudflare or Netlify, Vercel, PHP or WordPress. Paste one pair per line, pick a default code (301, 302, 307, 308 or 410) and your server, then copy or download the file. It flags loops, chains, duplicates and conflicts.
Want to go further? Ask
What does the redirect generator do?
It writes the redirect rules for you, in the exact syntax of your server or host. You give it pairs such as /old-page /new-page, and it returns a block you can paste into .htaccess, an Nginx server block, web.config, a _redirects file, vercel.json, a PHP script or the functions.php file of a WordPress child theme.
Before writing anything, it checks the whole list. It follows each redirect to its final destination, so it can spot a loop (A goes to B, B goes back to A) and a chain (A goes to B, B goes to C). It also flags lines listed twice, addresses with two different targets and pages that point to themselves. Everything runs in your browser: no account, and your list is not sent anywhere.
How do you use it, step by step?
- Paste your pairs in the box, one per line: old address, new address, and an optional code. Separate the cells with a space, a tab, a comma or a semicolon. A CSV export from a spreadsheet works, and a header line is skipped.
- Start each address with / or https://. A line that does not is marked as an error.
- Pick the default code. It applies to every line without its own code. Use 301 for a page that moved for good.
- For a page you deleted, leave the new address empty and add 410 on that line, for example
/discontinued-product,,410. - Pick your server or host in the second list. The rules update as you type.
- Fix the errors and warnings shown above the table, then click Copy or Download.
How do you read the result?
Three counters come first: Rules ready, Errors and Warnings. Below them, a list explains each problem in plain words, and a table gives every line a status.
- Ready: the line became a rule.
- Left out: the line was dropped, because it repeats an earlier line, gives a second target for the same address or points to itself.
- Error: the line was not understood, uses an unsupported code, or has no new address without being a 410.
- Loop: visitors would never reach a page. Fix it before going live.
- Chain: the rule works but takes several hops. Point the first address straight to the last one.
Chains matter because each hop slows the visitor down. Google's guide to site moves recommends "redirecting to the final destination directly" and, when that is not possible, keeping chains short (Google Search Central, site moves with URL changes).
Which code and which server format should you choose?
Pick the code from what happened to the page. Google lists 301 and 308 as permanent redirects, which show the new target in search results, and 302 and 307 as temporary ones, which keep the old page in results (Google Search Central, redirects and Google Search). The difference between the two pairs is that 307 and 308 keep the request method, which matters for forms and APIs, not for normal pages. For the full comparison, read 301 vs 302: when to use each.
| Server or host | File written | Where it goes | 410 rules |
|---|---|---|---|
| Apache | .htaccess | Root folder of the site | Yes (RedirectMatch gone) |
| Nginx | redirections-nginx.conf | Inside the server { } block | Yes (return 410) |
| IIS | web.config | Rewrite rules of the site | Yes (custom response) |
| Cloudflare / Netlify | _redirects | Published folder of the site | Written, check that your host accepts it |
| Vercel | vercel.json | Root of the project | No, those lines are left out |
| PHP | redirections.php | Top of the entry script, before any output | Yes |
| WordPress | functions-redirections.php | functions.php of your child theme | Yes |
For Apache, the tool writes RedirectMatch lines anchored with ^ and $, so each rule matches one exact path. The Apache manual explains that RedirectMatch matches a regular expression against the URL path, and that the gone status returns 410 with no target (Apache HTTP Server, mod_alias). For Vercel, the tool fills source, destination and statusCode in the redirects array, the fields Vercel documents for this file (Vercel docs, vercel.json redirects).
Examples
A blog that changed its URL structure
You move posts from /blog/2024/seo-tips to /blog/seo-tips. Paste one pair per post, keep 301 as default, pick your server. Each old post sends visitors and links to its own new address.
A shop that removed products
Products with a close replacement get a 301 to that replacement. Products with nothing similar get /old-product,,410. Google's site move guide says removed URLs should return 404 or 410 rather than pointing many old pages to one unrelated page such as the home page.
A chain left by an earlier migration
Your list contains /a /b and /b /c. The tool shows "Chain: /a → /b → /c" and marks the first line. Change it to /a /c and the warning goes away, while /b /c stays.
Common mistakes
- Redirecting everything to the home page. Map each old page to its closest new page, or return 410.
- Using 302 for a permanent move. Search engines then keep the old address in results.
- Replacing your existing file. If
.htaccessor_redirectsalready exists, add the new rules to it instead of overwriting it. - Forgetting the trailing slash. The tool treats
/pageand/page/as the same address when it checks duplicates, but writes the exact path you typed. Use the form your old site really served. - Removing the rules too early. Google advises keeping redirects "generally at least 1 year" after a move.
What are the limits of the tool?
- It does not test your server. It writes rules from your list. After publishing, test a few old addresses with the redirect checker.
- It does not check that the new pages exist. A rule that points to a missing page sends visitors to an error. Run the broken link checker on the targets.
- Paths only. A full address such as https://old-site.com/page is written as its path, so put the rules on the old domain. Query strings (the ?... part) are ignored.
- One-to-one rules. There are no wildcard or pattern rules: every old address needs its own line.
- No 410 on Vercel. Those lines are left out and the tool tells you how many.
New to the topic? The glossary entry on the 301 redirect explains how a moved page keeps its value, and the SEO migration checklist covers the steps around the redirect list.
When should you move to Sorank?
Use the generator for the rules, then watch what happens to your traffic. Redirects protect the visits you already have; they do not tell you whether the moved pages keep their rankings in Google or their place in AI answers. The Sorank GEO and SEO dashboard follows your Google traffic and your visits from AI assistants in one view, so you see quickly if a migration cost you visits, and Sorank keeps growing that traffic on autopilot.















































































































































