Redirect Map Generator

Turn a two-column old → new URL list into copy-ready 301 redirect rules for nginx, Apache, Netlify, Vercel, or Cloudflare — all in your browser.

The Redirect Map Generator runs entirely in your browser. The old and new URLs you paste are parsed and formatted on your device and never leave it or reach ArrayKit.

Built and maintained by Udit Agarwal

Open the nginx Config Generator

About Redirect Map Generator

The Redirect Map Generator turns a plain old → new URL list into copy-ready 301 redirect rules for the platform you actually deploy on. Paste two columns separated by a comma, tab, arrow, or spaces, then pick a target: nginx return 301 blocks, Apache RedirectMatch rules, a Netlify _redirects file, a Vercel vercel.json array, or a Cloudflare Bulk Redirects CSV. Toggle path-only to strip scheme and host, and normalize trailing slashes on the match side so old and new paths line up. It is built for the messy part of a site migration, a CMS replatform, or a domain move — when a spreadsheet of hundreds of redirects has to become server config fast. Everything runs on your device; the URL map you paste never leaves the browser.

Features

  • Paste a two-column old → new list from a spreadsheet, CSV, or plain text
  • Auto-detects comma, tab, arrow (→ / ->), and whitespace column separators
  • Generates nginx exact-match 'return 301' location blocks
  • Generates Apache .htaccess RedirectMatch 301 rules inside an IfModule
  • Emits a Netlify _redirects file with forced '301!' lines
  • Builds a Vercel vercel.json redirects array with statusCode: 301 (permanent: true would give a 308)
  • Exports a Cloudflare Bulk Redirects CSV with the expected columns
  • Path-only and trailing-slash toggles keep the match side consistent

How to use the Redirect Map Generator

  1. Paste your old → new URL pairs, one per line, into the input box
  2. Pick a target platform: nginx, Apache, Netlify, Vercel, or Cloudflare
  3. Set path-only and the trailing-slash rule to match your site
  4. Copy the generated rules or download the config file for deployment

Example

Input

/old-page, /new-page
/blog/2020/hello -> /articles/hello

Output

location = /old-page {
    return 301 /new-page;
}

location = /blog/2020/hello {
    return 301 /articles/hello;
}

A comma- and arrow-separated map compiled into nginx 301 blocks.

Common errors & troubleshooting

  • A row is silently skipped and missing from the output. — Each line needs two columns — an old and a new URL. Rows with only one token, blank lines, and #comment lines are ignored on purpose.
  • nginx rules match too many paths or not at all. — The generator uses exact 'location =' matches. Turn on path-only so the scheme and host are stripped, and set the trailing-slash rule to match how your old URLs actually end.
  • Absolute URLs end up in the rules when you wanted paths. — Switch the path-only toggle to Path. It strips 'https://host' from both columns so the rules match on the request path instead of the full URL.
  • The Cloudflare CSV import rejects a row. — Confirm the source_url and target_url are absolute or root-relative as Cloudflare expects, and that a cell containing a comma is quoted — the generator quotes those automatically.

Frequently asked questions

What input format does the Redirect Map Generator accept?
Any two-column old → new list. Columns can be separated by a comma (CSV), a tab (TSV), an arrow like -> or →, or one or more spaces. Paste straight from a spreadsheet, a text file, or a chat message and the tool figures out the delimiter per line.
Which platforms can it generate 301 redirects for?
Five: nginx (return 301 location blocks), Apache .htaccess (RedirectMatch 301), Netlify (_redirects with 301!), Vercel (vercel.json redirects array), and Cloudflare (Bulk Redirects CSV). Switch targets and the same URL map recompiles instantly.
What is the difference between path-only and absolute rules?
Path-only strips the scheme and host, so 'https://site.com/old' becomes '/old' — ideal when the server already scopes to one domain. Absolute keeps the full URL, which you want for cross-domain moves or Cloudflare rules that reference the origin host.
How does the trailing-slash toggle work?
It normalizes the trailing slash on the match (old) side only, so /old and /old/ both resolve the way you intend. Add appends a slash, Remove strips it, and Keep leaves paths exactly as pasted. A bare '/' is never changed.
Why are 301 redirects used instead of 302?
A 301 is a permanent redirect, so browsers and search engines pass link equity to the new URL and cache the move. That is what you want for a migration or domain change; the generator emits 301 for every rule.
Is my list of URLs uploaded anywhere?
No. The Redirect Map Generator parses and formats everything in your browser with plain JavaScript. The old and new URLs you paste stay on your device and are never sent to ArrayKit or any server.

Related tools

  • Nginx Config Generator — Build an nginx server block (static, reverse proxy, SSL, gzip, caching) from simple toggles.
  • .htaccess Generator — Toggle and configure common Apache .htaccess snippets with live output.
  • robots.txt Generator — Visually build a robots.txt with user-agent rules, allow/disallow paths, crawl-delay and sitemaps.
  • XML Sitemap Generator — Turn a list of URLs into a standards-compliant sitemap.xml with optional lastmod, changefreq and priority.
  • Meta Tag Generator — Generate SEO, Open Graph and Twitter Card meta tags for your page from a simple form.
  • CSP Header Generator — Build a Content-Security-Policy header from directive toggles, with report-only and copy output.

Guides

More Web & DevOps tools

  • JSON-LD Generator — Generate schema.org JSON-LD structured data for Article, Product, FAQ and more from a form.
  • Query String to JSON — Convert a URL query string to JSON and back, handling nested keys and repeated params.
  • HTML to JSX Converter — Convert HTML to valid React JSX: className, style objects, self-closing tags and camelCase.
  • CSS Gradient Generator — Design linear, radial and conic CSS gradients with live color stops and copy the code.
  • CSS Box Shadow Generator — Build layered CSS box-shadow values with a live preview and copyable code.
  • CSS Border Radius Generator — Create simple or per-corner CSS border-radius, including blob shapes, with a live preview.
  • .editorconfig Generator — Generate an .editorconfig from indent, charset and newline options with per-language overrides.
  • Aspect Ratio Calculator — Simplify ratios, solve missing dimensions and fit sizes into boxes, with CSS output.
  • Color Palette Generator — Generate harmonious color palettes: lock colors, pick a harmony, copy HEX and export CSS, Tailwind or JSON.
  • Chmod Calculator — Convert Unix file permissions between octal and symbolic (rwx).
  • .gitignore Generator — Build a .gitignore from common language and tool templates.
  • HTTP Status & MIME Types — Searchable reference of HTTP status codes and MIME content types.

See all Web & DevOps tools (27) · All tools