Promo code+10% bonus tokens when you top up your SpeedyIndex balanceTop up →
IndexFix Tools
Runs in your browser

Bulk 301 redirect generator for Apache and Nginx

A site move or a URL change needs hundreds of redirects, and one wrong line can create a loop. Generate the rules from your mapping and check them before you deploy.

Or upload a file

Opens up to 50 old URLs after the rules are live and compares where they really lead with the map. Relative paths need the domain field.

Online checks send only the address to the IndexFix Tools server, which downloads that public page and passes the answer back. Nothing is stored.

Your data stays in your browser. Nothing is uploaded or stored.

Key facts

Free PDF

Download the checklist: diagnosing indexing problems

Step by step: status in Search Console, page availability, robots.txt, noindex, canonical URL, redirects, sitemap and backlinks, with what to do in each case.

Download PDF PDF · 2 pages

How to use it

  1. Prepare the mapping: one old URL and its new URL per line, separated by a comma, tab or arrow.
  2. Paste it or choose a CSV file, and enter the site host if the old URLs are full addresses.
  3. Choose the server (Apache, Nginx or both) and the status code.
  4. Click Generate rules and fix everything in “Check these first”.
  5. Copy or download the rules, test them on a staging server, then deploy.

Where to get the data

A crawl of the old site

The full list of old URLs, including those with parameters.

Old sitemaps and analytics

Old sitemap files and the most visited pages, so important URLs aren't missed.

Your mapping spreadsheet

Two columns, old and new, exported as CSV.

Exact matches on Apache

Apache's Redirect directive matches by prefix, so a rule for /old also catches /old-page. The generator uses RedirectMatch with ^ and $ for exact matches. URLs with a query string need mod_rewrite, so those rows get RewriteCond and RewriteRule lines with the QSD flag, which drops the old query string (Apache 2.4 and later).

Nginx with a map

For Nginx the generator writes a map on $request_uri, which includes the query string, and one if block that returns the redirect. The map goes in the http context and the if block in the server block.

Chains and loops

If a new URL is itself redirected further on in the list, the old URL is pointed straight at the final target. A loop, where URLs redirect back to each other, is left out and listed so you can fix the mapping.

Next step

After deploying, go through the post-migration SEO checklist.

Questions and answers

301 or 308?

Both are permanent redirects and Google treats them the same way. 308 also tells clients to keep the request method.

Does it support patterns or wildcards?

No. It writes exact one-to-one rules, which are the safest choice for a URL map.

What about old URLs on another domain?

Enter the old site's host; rows whose old URL is on a different host are skipped and listed.

How long should the redirects stay?

Google suggests generally at least one year, and longer if possible.

Sources

Other free tools