Redirect Map Generator: CSV to Next.js, Nginx & Apache
Turn a list of old and new URLs into ready-to-deploy redirect rules. The tool flattens chains, removes loops and duplicates, and runs entirely in your browser.
What is a redirect map?
A redirect map pairs every old URL on your website with the new URL that replaces it. If you are redesigning a site, moving to a new framework, changing your URL structure or switching domains, the map is what keeps your visitors, backlinks and search rankings from ending up on a 404 page.
Writing the rules by hand for a few hundred pages is slow and easy to get wrong. A single typo can create a loop, and chains build up quietly when old redirects meet new ones. This tool takes the spreadsheet you already have and produces clean config for the platform you use.
How to generate bulk 301 redirects from a CSV
- 1List your old URLs and where each one should go, one per line, as a CSV, tab-separated or pasted text. Paths and full URLs both work.
- 2Pick your default status code. Use 301 or 308 for permanent moves and 302 or 307 for temporary ones. A third column overrides it for a single row.
- 3Leave "Flatten redirect chains" on so visitors and crawlers reach the final page in one hop.
- 4Choose your platform: Next.js, Vercel, Nginx, Apache or Netlify / Cloudflare Pages.
- 5Review the report, then copy or download the file and deploy it.
Redirect CSV format
Use two columns, old URL then new URL, with an optional third column for the status code. The tool accepts comma, semicolon or tab separators, skips a header row, ignores lines starting with #, and accepts either paths or full URLs.
old,new,status /about-us.html,/about /blog/2019/seo-tips/,/blog/seo-tips https://example.com/services.php,https://example.com/services /shop?id=42,/products/blue-widget /temp-sale,/sale,302
Supported output formats
| Platform | File | Where it goes |
|---|---|---|
| Next.js | next.config.js | Merge the redirects() function into your Next.js config and restart. |
| Vercel | vercel.json | Project root. Merge the redirects array if the file exists. |
| Nginx | redirects.conf | map blocks in the http context, if lines in the server block. |
| Apache | .htaccess | Site root. Uses RedirectMatch, plus RewriteRule for query strings. |
| Netlify / Cloudflare Pages | _redirects | Publish directory. |
301 vs 302 vs 307 vs 308 redirects
| Code | Type | When to use it |
|---|---|---|
| 301 | Permanent | The page moved for good. The standard choice for migrations and URL changes. |
| 308 | Permanent | Same as 301, but guarantees the request method (such as POST) is preserved. Next.js uses 308 for permanent: true. |
| 302 | Temporary | A short-term move, such as a sale page or maintenance. The old URL stays the main one. |
| 307 | Temporary | Same as 302, but preserves the request method. |
What the tool checks for you
Duplicate sources
If the same old URL appears twice, the first entry is kept and the rest are reported.
Self-redirects
A URL that redirects to itself is removed before it can cause an endless request.
Redirect chains
A to B to C becomes A to C, so every visitor and crawler needs only one hop.
Redirect loops
Rows that point back at each other are detected and removed from the output.
Site migration redirect checklist
- Crawl the old site first and export every URL that gets traffic or backlinks. These are the ones that must not break.
- Redirect each old page to the most relevant new page. Sending everything to the homepage is treated like a soft 404.
- Update internal links, canonical tags and your XML sitemap to the new URLs so they no longer depend on redirects.
- Test a sample of old URLs after launch, and crawl the old URL list again to catch any that still return 404.
- Keep the redirects live for at least a year, and watch Search Console for new crawl errors.
Redirect map generator FAQs
What is a redirect map?
A redirect map is a list that pairs each old URL with the new URL that should replace it. You build one when you migrate a site, change your URL structure, merge pages or switch domains, so visitors and search engines land on the right page instead of a 404.
How do I bulk create 301 redirects from a CSV?
Put the old URL in the first column and the new URL in the second, paste or upload the file into the tool, choose your platform and download the generated rules. Add a third column with a status code if some rows need something other than your default.
What is a redirect chain and why should I avoid it?
A chain is when one redirect leads to another, for example /a to /b to /c. Each extra hop adds latency and gives crawlers more work. Flattening the chain makes /a go straight to /c. The tool does this for you when the option is on.
What is a redirect loop?
A loop happens when redirects point back at each other, such as /a to /b and /b to /a. Browsers show an error and the page never loads. The tool detects loops and removes the rows involved so they never reach your config.
Does the tool handle URLs with query strings?
Yes. A source such as /shop?id=42 is converted into a rule that matches the query. Next.js and Vercel use a has condition, Apache uses a RewriteCond on the query string, Nginx matches on the request URI, and Netlify uses a parameter match.
Why are #fragments removed from my URLs?
Browsers never send the part after # to the server, so a server redirect cannot match on it. The tool drops fragments from relative URLs so your rules stay valid.
Is my URL list uploaded anywhere?
No. The list is parsed and converted entirely in your browser, so nothing is sent to or stored on a server.
How long should I keep redirects in place?
Google advises keeping redirects for at least a year after a site move, and longer if the old URLs still receive links or traffic. Removing them early can bring back 404s for anyone still using the old addresses.
Planning a website migration or redesign?
DEVNTOM Solutions handles the whole move: URL mapping, redirects, performance and SEO, so you keep your rankings.