How to use the bulk redirect generator
Paste one redirect per line, with the old address first and the new address second. You can separate them with a tab (copying two columns straight from a spreadsheet works), a comma, a space or an arrow. Full URLs and paths like /old-page both work. Then pick the output format and redirect type, and copy or download the result.
While generating the rules, the tool also cleans up your redirect map:
- Chains are shortened. If A redirects to B and B to C, A is pointed straight at C, so visitors and search engines take one hop instead of two.
- Loops are removed. Rules that would send visitors in a circle are left out and reported.
- Duplicates and mistakes are skipped: repeated old URLs, pages redirecting to themselves and lines with only one address.
- Same-site targets become relative (optional), which keeps rules working if you later change the domain or protocol.
Output formats
| Format | Where it goes |
|---|---|
| Apache .htaccess | The .htaccess file in your site's root folder on cPanel and most shared hosting. Paste the rules near the top, above any WordPress block. |
| Nginx | Your server configuration: the map block goes in the http section and the if line in your site's server block. Reload Nginx afterwards. |
| Netlify / Cloudflare Pages | A file named _redirects in the folder you publish. |
| Shopify CSV | Shopify admin, then Content, then Menus, then URL redirects, then Import. |
| WordPress (Redirection) | The free Redirection plugin's import tool, under Tools, then Redirection, then Import/Export. |
The Apache rules match each old path exactly, with or without a trailing slash, rather than using the Redirect directive, which also catches every address that starts with the same path. Old URLs with a query string, like /page?id=5, are matched on that exact query.
301, 302 or 308?
Use 301 for anything permanent: moved or merged pages, deleted products with a close replacement, a new URL structure or a domain change. It tells search engines to index the new address instead of the old one. 308 is also permanent and keeps the request method, which only matters for forms and APIs. Use 302 only for moves you plan to undo.
After you upload the rules
Test a sample of old URLs, and especially your most-linked pages, in the Redirect Checker. Each should show a single 301 to a page returning 200. Then update internal links and your XML sitemap to use the new addresses directly, so the redirects only need to catch old bookmarks and backlinks.
Frequently asked questions
How do I redirect many URLs at once?
List each old and new URL on its own line, generate the rules for your platform here, and paste them into your .htaccess file, server config or import tool in one go.
Where do redirect rules go in a WordPress .htaccess file?
Above the line # BEGIN WordPress. WordPress's own rules send every unknown address to index.php, so redirects placed after them never run.
Why not use the Redirect 301 directive?
Redirect matches addresses that start with the path, so Redirect 301 /blog /news also redirects /blog/any-post to /news/any-post. The RewriteRule lines generated here match each path exactly.
Can I redirect a URL with a query string?
Yes, for .htaccess, Nginx, Shopify and WordPress. The rule matches that exact query string. Netlify and Cloudflare Pages redirects files can't match exact query strings, so those lines are listed as skipped.
Last updated
