Redirect Map Builder
Turn a list of old and new addresses into redirect rules for Apache (.htaccess), nginx, Netlify or Cloudflare Pages, Vercel or Caddy, with duplicates, loops and chains found and chains pointed straight at their end.
About this tool What it's for, how to use it and an example
What it's for
When a site moves or its pages are renamed, every old address needs a redirect to its new one, or visitors and search engines land on “page not found” and the old pages’ standing in search is lost. This turns a list of old and new addresses, such as a spreadsheet column pair, into the rules your server or host needs, and checks the list for the mistakes that break redirects.
For example, when you rebuild a WordPress site as a static site on Netlify, export the old page list, put each new
address beside it, paste both columns here and save the result as _redirects.
How to use it
Paste one redirect a line: the old address, then the new one, separated by a comma, tab or space (so columns
copied from a spreadsheet work), and a status code after them if that line needs a different one. A heading line
is skipped, and a full old address keeps only its path and query (?id=5).
To start from the old site’s sitemap.xml, paste the whole file: it becomes one line for each page it lists, and
you type each page’s new address after its comma. A sitemap index only lists other sitemaps, so paste those.
- An old address ending in
*covers everything under it; a*in the new address puts back the part it matched, as in/blog/*,/news/*. - Choose the server or host under For, and the usual status: 301 for a permanent move (the normal choice), 302 or 307 for a temporary one.
- Point chains straight at their end rewrites a redirect to a page that is itself redirected so it goes straight to the last one.
Duplicates, loops and redirects to themselves are listed above the rules. Copy them, or Save as a file
with the name the host expects (a saved .htaccess may need renaming, as some systems hide or rename files whose
names start with a dot). The settings are remembered in this browser.
Example
Press Try an example, or paste:
old,new
/about-us,/about
/about,/company
https://www.example.com/team.php?id=5,/company/team
/blog/*,/news/*
/press,https://news.example.org/,302
With For set to Apache, it notes that /about-us → /about → /company is a chain, and gives
RedirectMatch 301 ^/about-us$ /company, a RewriteCond and RewriteRule pair for the query,
RedirectMatch 301 ^/blog/(.*)$ /news/$1 and a 302 for /press.
Good to know
Netlify’s and Cloudflare Pages’ _redirects can’t match one exact query, so those lines come out as comments.
For nginx, paste the rules inside the site’s server { } block; the query rules use if, which is safe there
because it only returns. Chains and loops are only found among the addresses in your list, and only where the new
address is a path on the same site.
Guide: Moving a website without losing visitors
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.