AltUtils

Redirect Helper

Bulk-generate 301, 302, 307 and 308 redirects for Nginx, Apache, Netlify, Vercel, Next.js, Cloudflare and IIS, with chain and loop detection to preserve SEO.

CategoryWeb & SEO
Sheet36 / 42
ProcessingIn your browser

Settings

Default status code

301 — Moved permanently. A third column on a line (e.g. /a /b 302) overrides it.

Lets the tool treat absolute URLs on your domain as internal (for chain detection) and completes the Cloudflare CSV.

Redirect list

One redirect per line: old URL, new URL and an optional status code, separated by spaces, tabs or commas (CSV with quotes and a header row works too). Lines starting with # are ignored.

4 redirects ready

Generated rules

4 rules · .htaccess
  • Requires mod_rewrite. If the file already contains rewrite rules (e.g. WordPress), put these above them.
  • The QSD flag (drop the query string) needs Apache 2.4 or later.

Test a URL

Enter a path or full URL to see which rule it hits and where it finally lands. The simulation follows exact-match server behaviour (as in the Apache, Nginx and IIS output).

What is the Redirect Helper?

The Redirect Helper turns a list of old and new URLs into ready-to-paste redirect rules for Apache (.htaccess with mod_rewrite), Nginx, Netlify _redirects, vercel.json, the Next.js redirects() config, Cloudflare Bulk Redirects (CSV) and IIS web.config. Paste pairs separated by spaces, tabs or commas, or import a CSV exported from a spreadsheet or crawler, pick 301, 302, 307 or 308 (per line if you like) and copy or download the result.

Every value is escaped for its destination: regex metacharacters such as dots, parentheses and plus signs in mod_rewrite and IIS patterns, quoting and variables in Nginx, path-to-regexp characters in Next.js and Vercel sources, JSON strings, CSV fields and XML attributes. Spaces and non-ASCII characters are percent-encoded, sources with a #fragment or a non-http scheme are rejected, and each problem is reported with its line number.

Before you deploy, the tool flags duplicate and conflicting sources, self-redirects, redirect chains (A → B → C) that you can flatten into a single hop, and loops that would make pages unreachable. A built-in tester shows which rule a URL hits and where it ends up. Everything runs locally in your browser; your URL lists are never uploaded.

Frequently asked questions

301, 302, 307 or 308 — which redirect should I use?
Use a permanent redirect (301 or 308) when a page has moved for good and a temporary one (302 or 307) when the old URL will come back. 307 and 308 also require the browser to repeat the same HTTP method (a POST stays a POST), while clients may turn a 301 or 302 into a GET. Google treats 301 and 308 as a strong signal that the new URL should be shown in search results and 302 or 307 as a weak one; Google has said that 3xx redirects don't lose PageRank, so the choice is mainly about which URL you want indexed.
Where do I put the generated rules?
Apache: the .htaccess file in your document root (or the VirtualHost config), with mod_rewrite enabled. Nginx: inside the server block, then run nginx -t and reload. Netlify: a file named _redirects in the publish directory. Vercel: the redirects array of vercel.json. Next.js: the redirects() function in next.config.js. Cloudflare: upload the CSV as a Bulk Redirect List and enable it with a Bulk Redirect Rule. IIS: web.config, with the URL Rewrite module installed.
How are query strings handled?
With “Preserve query string” on, parameters such as ?utm_source= are forwarded to the new URL (QSA/QSD flags in Apache, $is_args$args in Nginx, appendQueryString in IIS, preserve_query_string in Cloudflare). Netlify and Next.js always forward them. A source that contains a query string (/page.php?id=42) matches that exact query in Apache, Nginx and IIS and doesn't pass it on; Next.js and Vercel get “has” conditions instead, while Netlify and Cloudflare Bulk Redirects can't match literal query values, so those rules are commented out or left out.
What is a redirect chain and why flatten it?
A chain is a redirect whose target redirects again (A → B → C). Each hop adds a round trip for visitors, and Googlebot follows at most 10 hops before reporting a redirect error. Flattening rewrites A → C directly while keeping B → C for anyone who still requests B. Loops (A → B → A) can never resolve, so those rules are left out until you fix them.
Why does the tool escape dots, parentheses and other characters?
In mod_rewrite and IIS the source is a regular expression: an unescaped dot matches any character, “?” makes the previous character optional and parentheses create groups. Next.js and Vercel treat ( ) { } : * + ? as path-to-regexp syntax, Nginx needs quotes around values with spaces or semicolons and interprets $ as a variable, and mod_rewrite reads %N and $N as back-references. Escaping makes every rule match exactly the URL you typed.
Does it support wildcards or regex redirects?
No — every rule is an exact match for one URL, which is what most migrations need and what keeps the rules safe to generate in bulk. Characters such as * are matched literally (the tool warns you). For pattern rules like /blog/* → /news/:splat, write them by hand in your server's own syntax.
Are my URLs sent anywhere?
No. Parsing, validation, rule generation and the URL tester all run in your browser, and imported CSV files are read locally with the File API. Nothing is uploaded or fetched.