Free SEO Tool

301 Redirect Generator

Paste your old-to-new URL mapping and get working redirect rules for Apache .htaccess, Nginx, Netlify _redirects, vercel.json or a Cloudflare Bulk Redirects CSV. Every format is written to its own vendor's documented syntax, and the mapping is checked for the three faults that break migrations: loops, chains, and the same source URL claimed twice.

How it works, plainly: this is a rule-based generator, not an AI model. Every result is assembled from tested formulas, templates and validators that run entirely in your browser — no model call, no cost, and nothing you type is uploaded.

  • Free
  • 5 platforms
  • Finds loops & chains
  • Runs in your browser

One per line: old,new — a comma, tab or -> all work

Redirect rules
 

How it works

  1. 01
    Paste your mapping

    One redirect per line: old and new separated by a comma, a tab, or an arrow. A CSV export from a crawl pastes straight in.

  2. 02
    Pick the platform

    Apache, Nginx, Netlify, Vercel or Cloudflare. The output changes shape, not just formatting.

  3. 03
    Fix what we flag

    Loops, chains, self-redirects and duplicate sources are listed with the line numbers so you can correct the source data.

  4. 04
    Download the file

    Named correctly for its platform — .htaccess, redirects.conf, _redirects, vercel.json or bulk-redirects.csv.

Sources

Related tools

FAQ

Frequently asked questions

Does vercel.json's "permanent": true give me a 301?
No — it emits a 308. Vercel's configuration reference shows "permanent": false producing a 307 Temporary Redirect and "permanent": true producing a 308 Permanent Redirect; to get a 301 Moved Permanently you must write "statusCode": 301 instead. That is why this generator writes statusCode explicitly rather than using the permanent shorthand: you get the status code you picked. Functionally 308 and 301 both signal a permanent move, and the difference is that 308 forbids changing the request method, but if your audit expects 301 you should emit 301.
What is a redirect chain and why does it matter?
A chain is when A redirects to B and B redirects to C. Every hop is an extra round trip before the browser gets the page, and a chain is the normal outcome of two migrations done a year apart — nobody goes back and flattens the first set. This tool detects chains in the mapping you paste and tells you to point A straight at C. It also detects loops, where A points to B and B points back to A, which browsers abandon after a handful of hops with an error page.
What format does Cloudflare Bulk Redirects expect?
A CSV with no header row. The columns, in order, are SOURCE_URL, TARGET_URL, STATUS_CODE, PRESERVE_QUERY_STRING, INCLUDE_SUBDOMAINS, SUBPATH_MATCHING and PRESERVE_PATH_SUFFIX; only the first two are required and the default status code is 301. The scheme on the source URL is optional, not forbidden: Cloudflare’s supported URL components table lists Scheme in a source URL as "Yes, http or https only (optional)", and the parameters reference adds that when the scheme is omitted the redirect applies to both http and https. This generator emits the scheme-less form — example.com/contacts — so one row covers both; write https://example.com/contacts only if you deliberately want the rule to match https alone. What a source URL genuinely cannot carry is user information, a port, a query string or a fragment. This generator leaves the four optional flags blank.
Where does the Netlify _redirects file go?
In your publish directory — the folder you actually deploy, not necessarily your repository root. Each line is [original path] [new path or URL] [optional parameters], and when no status code is given the default is 301. Lines starting with # are comments. If your generator excludes files beginning with an underscore, you have to configure it to include this one, or the file will simply not be deployed.
Does the old path have to start with a slash?
For Apache, yes. mod_alias documents the old URL-path as a case-sensitive path beginning with a slash, and states that a relative path is not allowed. The target may be a full URL on a different host. This tool strips the scheme and host from your source column automatically so the Apache and Nginx outputs are valid even when you paste absolute URLs on both sides.
301 or 302?
Use 301 when the move is permanent — the old URL is not coming back — which is the case for almost every migration, domain change or URL restructure. Use 302 when the original will return, such as during a temporary campaign page or an A/B test. This tool defaults to 301 and lets you switch, because picking the wrong one is a decision about your site, not something a tool can infer from the URLs.