DevTools Logo

Bulk Redirect Map Generator

Bulk Redirect Map Generator

Turn an old → new URL list into nginx, Apache, Netlify and Vercel redirect configs at once.

Runs in your browser
0 rules ready0 conflicts0 duplicates0 wildcardsformat: empty
Try an example

URL pairs

empty · empty

Paste CSV (old,new[,status]), whitespace pairs or a JSON array. Files are streamed in chunks, never uploaded.

Platform outputs

nginx · 0 rules

Paste old → new URL pairs to generate redirect configs

Nothing leaves your browser — migration maps stay local.

Examples

Exact and wildcard in nginx

Input
/old-page /new-page
/blog/* /news/:splat 308
Output
map $uri $redirect_301 {
    default "";
    "/old-page" "/new-page$is_args$args";
}

map $uri $redirect_308 {
    default "";
    ~^/blog/(.*)$ /news/$1$is_args$args;
}

The empty default leaves unmatched paths alone; $is_args$args carries the original query through.

The same map for Netlify and Vercel

Input
/legacy/about /about-us 301
Output
_redirects: /legacy/about /about-us 301
vercel.json: {"source":"/legacy/about","destination":"/about-us","permanent":true,"statusCode":301}

One canonical row, two platform syntaxes, same status code.

Duplicate versus conflict

Input
/a /b
/a /b
/a /c
Output
1 duplicate counted; the two different /a targets are flagged as a conflict and excluded until resolved.

Identical repeats are safe to dedupe; ambiguous targets need a human decision.

About this tool

A site migration turns a spreadsheet of old URLs and new URLs into several different configuration formats. This tool treats that list as one canonical map, then emits nginx map blocks, Apache mod_alias RedirectMatch lines, a Netlify _redirects file and a vercel.json redirects array from it. You edit the map once; every platform output stays in sync.

Paste CSV (old,new[,status]), whitespace-separated pairs or a JSON array. Paths and absolute URLs are normalized consistently, trailing slashes follow a policy you choose, and origin stripping handles domain migrations. Wildcards such as /blog/* are translated per platform: a regex capture for nginx and Apache, :splat for Netlify and :path* for Vercel.

Before emitting anything, the tool dedupes identical rows, flags sources with conflicting destinations, warns about wildcard/exact overlap and rejects sources that could never match a platform config. Conflicting rows are excluded until you resolve them with Keep in the rule table. All four status codes — 301, 302, 307 and 308 — are preserved explicitly, including in vercel.json where a bare `permanent` flag cannot tell them apart.

Everything happens in your browser. Migration maps can reveal upcoming launches and are never uploaded or stored.

What this tool does not do

  • This tool authors mapping tables; it does not follow live redirect chains or test deployed rules.
  • Platform syntax changes over time — review the generated files against current platform documentation before deploying.
  • Query strings in source paths are preserved textually but are not matched by the emitted path-based nginx/Apache rules.
  • Vercel and Netlify impose plan-dependent rule limits; the byte/rule chips are informational, not deploy-time enforcement.
  • Fragments (#) are never sent to servers by browsers, so rules involving them cannot match.
  • Very large maps are held in browser memory for live preview; use the CSV export for offline review.

How to use this tool

  1. Paste or drop your URL list

    Use old,new CSV with an optional status column, old new pairs (arrows are accepted), or a JSON array of {from, to} objects. You can also drop a .csv, .json or .txt file; it is streamed in chunks.

  2. Choose normalization options

    Set the default status (301/302/307/308), a trailing-slash policy, rule order, Strip domain for cross-domain moves, and the Netlify force flag when static files shadow rules.

  3. Review conflicts and flags

    The summary counts ready rules, conflicts, duplicates and wildcards. Red rows are ambiguous; click Keep on the destination you want, or Remove to drop a row. Reset edits restores the pasted map.

  4. Switch platform tabs

    The output panel has nginx, Apache, Netlify and Vercel tabs. Exact rules are always emitted before wildcards; read the per-platform notes under the rule table before deploying.

  5. Copy or download

    Copy the active config, download one platform file, download all four files, or export the reviewed map as redirect-map.csv. Mod/Ctrl+Enter shows the outputs on mobile and Mod/Ctrl+Shift+Enter copies the active tab.

Use cases

Site migration

Move a sitemap's worth of URLs to a new stack and hand each platform team a ready config file.

SEO link equity

Choose 301 or 308 deliberately and preserve the exact code in vercel.json instead of a coarse permanent boolean.

Multi-platform agency work

Maintain one mapping table for clients deployed on nginx, Netlify and Vercel without reformatting by hand.

Domain cutover

Turn absolute old-site URLs into path rules with Strip domain, then review the emitted map as CSV.

Input and output formats

FormatBehavior
CSVold,new or old,new,status; quote-aware fields keep commas and doubled quotes intact
Whitespace pairsold new [status], with -> and → accepted as separators
JSON array[{from,to,status}] or [from,to,status]; old/new/source/destination aliases work too
nginxmap $uri blocks with an empty default, exact keys plus ~ regex keys, and per-status return snippets
ApacheAnchored RedirectMatch lines; plain Redirect is never used because it prefix-matches
Netlify_redirects lines with :splat wildcards and an optional ! force suffix
Vercelvercel.json redirects with :path* wildcards and an explicit statusCode for every rule

Query strings in source URLs are preserved in the output text; path-based matchers (nginx $uri, Apache RedirectMatch) need a separate rule if you must match on query parameters.

Common mistakes

Mistake:Using a map default of / with a blanket return

Fix:This generator's default is empty and the return is guarded by an if check, so unmatched pages keep working.

Mistake:Writing Redirect /old /new in Apache and assuming it is exact

Fix:mod_alias Redirect is prefix matching; the generated RedirectMatch rules are anchored with ^...$.

Mistake:Assuming permanent:true in vercel.json means 301

Fix:It only distinguishes 307/308 from 301/302. The generated file also sets statusCode so all four codes survive.

Mistake:Deploying Netlify rules that silently lose to existing static files

Fix:Enable the force flag (!) when a path already exists in the deploy output.

Mistake:Pasting absolute URLs as sources for path-based platforms

Fix:Turn on Strip domain or use path-only sources; absolute sources are flagged and excluded.

Frequently asked questions

301 vs 308 — which should I use?

Use 301 for a permanent URL change when the request method does not matter, which is the usual SEO migration case. Use 308 when the redirect must preserve the method and body, for example API endpoints receiving POST requests. 302 and 307 are their temporary counterparts. The tool emits the chosen code explicitly for all four platforms, including a statusCode field in vercel.json.

How do nginx map blocks work?

A map declares a variable whose value depends on another variable. Here each status group maps $uri — the path without the query string — to a destination. Exact keys win over ~ regex keys, so /blog/post beats /blog/*. The default is deliberately empty, and the usage snippet only returns a redirect when the variable is non-empty: if ($redirect_301 != "") { return 301 $redirect_301; }. Unmatched pages therefore keep working, and $is_args$args carries the original query to the destination.

How are wildcards translated per platform?

A source such as /blog/* becomes the anchored regex ^/blog/(.*)$ in nginx and Apache, with $1 as the capture. Netlify uses /blog/* with /news/:splat as the destination, and Vercel uses /blog/:path* with /news/:path*. You can write :splat, $1 or * in the target and the generator converts it for each platform. Exact rules are written before wildcard rules everywhere.

Can I use this for a domain migration?

Yes. Paste absolute old URLs and their absolute new URLs, then turn on Strip domain. Origins are removed so the emitted rules become path mappings such as /a → /b, which is what nginx, Netlify and Vercel configs expect. Add a separate host-level rule on your old domain to send traffic to the new one; this tool authors the path map, not DNS or host redirects.

What's the redirect limit per platform?

Limits are plan- and version-dependent. Vercel's vercel.json historically allowed roughly 1,024 redirects per deployment, Netlify limits rule counts by plan, and nginx handles thousands of map entries well. The chips under the output show rule count and byte size so you can spot an oversized map before deploying, but always confirm the current platform cap in its documentation.

Why are some rows excluded from the generated configs?

Sources that point to two different destinations (or statuses) are ambiguous, so both rows are flagged and withheld until you click Keep on one of them. Sources that are absolute URLs without Strip domain, or that lack a leading slash, can never match these platforms and are flagged too. Identical duplicates are simply counted and deduped; they are not errors.

Does a Netlify rule need the force flag?

Only when the source path also matches a file that exists in your deploy. In that case Netlify serves the static file and ignores the redirect unless the status is suffixed with !, for example 301!. Enable the force checkbox if you are replacing existing pages with redirects.

Is my redirect map uploaded anywhere?

No. Parsing, validation and all four emitters run in this browser tab. Files are streamed locally in chunks and nothing is stored or transmitted — important because a migration map often exposes unpublished URLs.

References & standards