RedirectForge by ThemeMend

Convert nginx redirects to Cloudflare Bulk Redirects CSV

Paste the redirect part of your nginx config. You get a CSV with Cloudflare's exact header, with location prefixes mapped to subpath rows. Free up to 200 rules, no signup. Load an example.

Output

What to know about this conversion

location = /old { return 301 /new; } converts to an exact row, and a prefix location ^~ /old/ with a rewrite ^/old/(.*)$ /new/$1 permanent; becomes a subpath row with preserve_path_suffix. Other directives in the same file (root, proxy_pass, try_files) are ignored with a count in the warnings.

nginx return drops the query string unless you append $is_args$args; the converter reads that and sets preserve_query_string accordingly. Cloudflare's default for that column is false, so check it if your old config relied on rewrite, which keeps the query automatically.

Bulk Redirects cannot run regex. A rewrite whose pattern has more than a trailing (.*), or any rule inside an if ($host ...) block, is left out of the CSV and reported by line with a pointer to Redirect Rules with regex_replace() (Business plan or higher).

Frequently asked questions

Why do I need to enter a domain?

Cloudflare's importer requires a hostname in source_url. Fill the Domain field and it is prefixed to every source; relative targets become https://your-domain/... so the file imports without edits.

What about server-level return 301 https://example.com$request_uri?

It is converted as a catch-all prefix rule on / with the path suffix preserved, and a warning notes that it applies to every request. If it sat inside an if ($host = ...) block the condition is reported instead, since Bulk Redirects cannot test the host.

Are rewrite ... last or break lines included?

No. Without permanent or redirect a rewrite is internal and never sends a redirect to the browser. Those lines are skipped with a warning naming the line.

Other pairs: .htaccess to Cloudflare, .htaccess to Netlify, Netlify to Vercel, nginx to Cloudflare, or any format to any other.