Skip to content
Rankora
Free · runs in your browser

Redirect Rule Generator

One list, six output formats. The tool checks every line, flags loops, duplicates and chains, then writes the syntax each platform expects.

Privacy and cost

This tool runs in your browser. What you type or paste is not sent to our servers and it costs nothing to use.

How it works

  1. Paste one redirect per line: source, target and an optional status (301, 302, 307 or 308). End a source with * to redirect a whole folder.
  2. Pick the platform: Apache, Nginx, Cloudflare (rules or bulk list), Netlify or Vercel.
  3. Read the messages (loop, chain, duplicate, refused character), then copy the config block or download the Cloudflare CSV.

Example

Given "/old-page /new-page" and "/blog/* /articles/*", Apache gets RedirectMatch 301 "^/old-page/?$" "/new-page" and RedirectMatch 301 "^/blog/(.*)$" "/articles/$1". Netlify gets "/blog/* /articles/:splat 301" and Vercel gets the source "/blog/:path*".

What the result means

Every platform has its own grammar: Apache regexes, Nginx map tables, Cloudflare expressions, _redirects files or JSON. The generator applies the same logic everywhere: exact rules come before folder rules, characters that would break a config file are refused and the $ sign is neutralised. Always test the output on your server, because the result depends on your other rules.

Common problems this tool helps with

  • A redirect loop (A to B, B to A) makes the page unreachable and wastes crawl budget.
  • A chain A to B to C adds needless hops: point A straight at C.
  • An unescaped regex (a dot, a plus, a parenthesis) matches the wrong URLs.
  • A 302 left in place after a migration keeps the old URL in the index.

Frequently asked questions

What is the difference between 301, 302, 307 and 308?

301 and 308 are permanent, 302 and 307 are temporary. 307 and 308 force the browser to repeat the same HTTP method (a POST stays a POST), while 301 and 302 may turn it into a GET. For a permanent page move, 301 is the usual choice.

Is the query string kept?

Yes by default: the option carries it over to the target. Untick it to drop it. If the target already has its own query string, the visitor's one is not appended on Nginx and Cloudflare.

Are my redirects sent to a server?

No. Generation runs in your browser and nothing is transmitted.

How do I redirect a whole folder?

End the source with * (for example /blog/*) and, to keep the rest of the path, put * in the target too (/articles/*). A target without * sends the whole folder to a single page.