Bulk 301 Redirect Generator

Updated October 2026

Paste a list of old and new URLs, one pair per line, and get the full set of 301 rules for Apache .htaccess, Nginx or PHP. Duplicates, self-redirects and invalid lines are flagged.

Advertisement

Advertisement

Input Mode

Format: old_url new_url, one redirect per line, separated by a space, tab or comma. An optional third value (301 or 302) overrides the redirect type for that line.

301 redirects preserve SEO link equity and are permanent

How the Bulk Redirect Generator Works

Paste your mapping, one redirect per line. The first value is the old path or URL, the second is the destination, and an optional third value sets 301 or 302 for that line:

/old-page /new-page
/blog/post-1 https://www.example.com/articles/post-1
/sale /offers 302

For Apache this produces:

RedirectMatch 301 ^/old-page$ /new-page
RedirectMatch 301 ^/blog/post-1$ https://www.example.com/articles/post-1
RedirectMatch 302 ^/sale$ /offers

Switch the server type to get the same list as Nginx location blocks or as a PHP lookup table. Spaces, tabs and commas all work as separators, so two columns copied from a spreadsheet can be pasted directly.

Building the Redirect Map for a Migration

  1. List every old URL. Export them from your CMS, your old sitemap and the Pages report in Search Console, or crawl the old site with the sitemap generator.
  2. Prioritise. URLs with backlinks or search traffic must be mapped one to one. Low-value URLs can share a destination.
  3. Map each one to its closest equivalent. Same topic, same intent. If nothing equivalent exists, let it return 404 or 410 rather than redirecting to the homepage.
  4. Generate and deploy the rules on a staging copy first if you can.
  5. Test. Paste the old URLs into the broken link checker: every line should show a redirect to the URL you intended.
  6. Update internal links to the new URLs so the redirects only serve external traffic, and submit the new sitemap.

Bulk Redirect Pitfalls

  • Chains. If /a already redirects to /b and you now move /b to /c, update the first rule to point at /c too.
  • Trailing slashes. The rules are exact-match, so /page and /page/ are different URLs. Add both if both were in use.
  • Case. Paths are case-sensitive on most servers.
  • Very long lists. Thousands of rules in .htaccess are read on every request. For large migrations, use a pattern rule for sections that keep their structure and exact rules only for the exceptions.

Redirect Generators for Other Servers

The same tool is available preset for each server, plus a combined version:

After the redirects are live, confirm each old URL answers 301 and lands on a working page with the broken link checker, and submit a sitemap of the new URLs made with the XML sitemap generator.

How to Use

  1. 1

    Bulk Redirects mode is already selected

  2. 2

    Paste one pair per line: the old path, then the new URL, separated by a space, a tab or a comma

  3. 3

    Optionally add 301 or 302 as a third column to override the type for that line

  4. 4

    Pick your server type: Apache (.htaccess), Nginx or PHP

  5. 5

    Review the notes for skipped or duplicate lines, then copy or download the rules

Why This Tool Matters for SEO

A site migration or URL restructure can involve hundreds of redirects, and writing them by hand is where mistakes creep in: a missed line becomes a 404, a typo becomes a redirect to the wrong page. Generating the rules from a two-column list means the mapping you reviewed in a spreadsheet is exactly what goes onto the server.

Frequently Asked Questions

What format should the list be in?

One redirect per line with the old URL first and the new URL second, separated by a space, a tab or a comma. Copying two adjacent columns from Excel or Google Sheets and pasting them in works as is. A third column with 301 or 302 sets the type for that line.

How many redirects can I generate at once?

There is no fixed limit in the tool; the rules are generated in your browser. In practice, a few thousand exact-match rules in .htaccess are fine, but beyond that a server-level map (RewriteMap on Apache, map on Nginx) is faster because it is a lookup rather than a list scanned on every request.

What happens to invalid or duplicate lines?

They are not silently dropped. Lines with a missing destination, too many values, a duplicate old URL or a redirect that points to itself are listed in a notes box so you can fix the source list.

Should every old URL redirect to the homepage?

No. Redirect each old URL to the closest equivalent page. Google treats mass redirects to the homepage as soft 404s, which means the old pages lose their rankings just as if they had been deleted.

Related Tools You Might Like

More in Technical SEO tools · All free SEO tools

Local Processing: Your data never leaves your browser