Skip to content
ToolBoxGeniehome

Redirect Map Generator

Developer Tools · Added

Paste a two-column list of old and new URLs and get rules for nginx, Apache, Netlify, Vercel or Next.js. Writing the rules is the easy half — what breaks a migration is a loop nobody noticed or a chain three hops long, so those are checked before anything is emitted, and chains can be flattened so each old URL points straight at its destination.

One pair per line. Blank lines and # comments are skipped.

The old URL is gone for good. Cached hard by browsers — difficult to undo.

Rules

Rules
5
Problems
0

Nothing that would break

Hops removed
1

Chains flattened

  • Warning · lines 6, 5/team reaches /about through 1 extra hop (/team → /about-us → /about). Point it straight at the destination.

The rules are the easy half. Chains and loops are what actually break a migration, and both are checked here before you deploy rather than after Search Console reports them: a loop stops the page loading at all, and every extra hop is a round trip Google follows only so many of. Flattening rewrites a chain so each old URL points straight at its final destination. Nothing is uploaded — the map stays in this tab.

How to use the redirect map generator

  1. 1Paste your list, one pair per line. Commas, tabs, arrows or spaces all separate them.
  2. 2Pick the server and the status code — 301 if the old URL is gone for good.
  3. 3Read the problems. Errors would break in production; warnings cost speed or clarity.
  4. 4Leave flattening on unless you need the chain preserved, then copy or download the rules.

Examples

A chain caught and flattened

Input
/team → /about-us and /about-us → /about
Result
Warned as a chain, and flattened to /team → /about so both old URLs land in one hop

A loop

Input
/a → /b and /b → /a
Result
Flagged as an error — a browser follows a few hops and then shows a failure page

The same source twice

Input
/old listed once to /new and once to /newer
Result
Flagged as an error: which rule wins depends on the server, which is not a plan

About the redirect map generator

What actually goes wrong in a migration

Not the syntax. Redirect rules are three tokens on a line and a typo in one is obvious the moment you test it. What goes wrong is structural, and it goes wrong quietly: a loop that only triggers for one URL nobody checks, a chain that forms months later when a second restructure lands on top of the first, the same source listed twice in a spreadsheet that two people edited.

None of those look wrong in the config file. They look wrong in Search Console six weeks afterwards, as pages drop out of the index with a message about too many redirects — by which time the traffic has already gone. Checking the map as a graph before deploying it costs nothing and catches all three.

Redirects are not free, even when they work

A correct 301 still costs a round trip: the browser asks for the old URL, gets a header back, and asks again. On a slow mobile connection that is a visible pause before anything renders, and it happens on every visit until the browser caches the redirect.

So redirects are a migration tool, not a permanent structure. The right end state is that internal links point at the current URLs and the redirects exist only for external links and old bookmarks. Leaving your own navigation pointing at redirected URLs means paying that round trip forever, for no reason — and it is worth grepping the site for the old paths once the map is in place.

What a redirect cannot fix

A redirect passes a page's signals to its replacement, which is useful when the replacement is genuinely the same content at a new address. It does much less when it is not. Redirecting a hundred deleted product pages to the homepage is a well-known way to get them treated as soft 404s: the destination has nothing to do with what was asked for, and search engines notice.

The honest options for content that is simply gone are a 404 or a 410, which say so plainly and let the URL drop out of the index cleanly. A redirect is for a move. Using it as a way to avoid admitting a deletion tends to produce the worst of both outcomes — the old URL does not rank and the destination is diluted.

Frequently asked questions

Why do redirect chains matter?
Every hop is a round trip the visitor waits for, and search engines follow only a limited number before giving up on the URL — Google documents a small limit and treats a long chain as a failure to resolve. Chains accumulate naturally: a site is restructured twice, and the redirects from the first move now point at URLs that moved again. Flattening turns each old URL into a single hop to its final destination, which is what it should have been.
301 or 302?
301 says the move is permanent, and browsers cache it aggressively — sometimes indefinitely, which makes a mistaken 301 genuinely difficult to undo for anyone who already hit it. 302 says temporary, and search engines keep the old URL indexed. Use 301 when the old URL is gone for good and you want its ranking signals to move; use 302 while you are experimenting. 307 and 308 are the same pair but method-preserving, which only matters when the redirected request might be a POST.
Why does it complain about trailing slashes?
Because most servers treat /page and /page/ as different URLs, so a rule written for one does not fire for the other. A map that mixes the two conventions will silently miss roughly half its targets. The warning fires when a meaningful share of the sources disagree; the fix is to normalise the list before deploying, and usually to add a separate rule handling the slash variant site-wide.
Which server formats are supported?
nginx location blocks, Apache mod_rewrite rules for .htaccess, Netlify's _redirects file, a vercel.json redirects array, and a next.config.js redirects function. The nginx output uses `return` rather than `rewrite` deliberately: it is faster, it does not re-enter location matching, and it will not mangle a query string by accident.
Are my URLs sent anywhere?
No. The parsing, the checks and the rule generation all run in this tab. A pre-launch URL map often reveals a site's whole structure before it is public, which is exactly the sort of thing that should not be pasted into someone else's server.