Redirect Rules Generator

Stateless — paste mappings, generate Nginx/Apache/Cloudflare rules. No uploads, no storage.
Back to tools https://mofidtech.fr/tools/redirect-rules/?mode=bulk&tab=Nginx&map=%2Fold-page+-%3E+%2Fnew-page%0A%2Fblog%2Fold-post+-%3E+%2Fblog%2Fnew-post%0Ahttps%3A%2F%2Fexample.com%2Fold+-%3E+https%3A%2F%2Fexample.com%2Fnew%0A
How to use
  1. Bulk rules: paste mappings like /old -> /new (one per line), then click Generate.
  2. Switch tabs to get Nginx, Apache (.htaccess), or Cloudflare CSV.
  3. Use Copy or Download for the selected output.
  4. Redirect checker: paste a URL to see the 301/302 chain. (Blocks localhost/private IPs; only ports 80/443.)
Tip: enable Preserve query strings to keep ?utm_source=... when redirecting.
Build
Load examples:
Supported: /old -> /new or old,new. Comments start with #.
Presets are helper snippets; mappings generate per-path rules.
Safety: blocks localhost/private IPs; only ports 80/443.
Reset
# Nginx redirects (paste inside your server { ... } )
# Tip: place these ABOVE your main location / { ... }

location = /old-page {
    return 301 /new-page;
}

location = /blog/old-post {
    return 301 /blog/new-post;
}

location = /old {
    return 301 https://example.com/new;
}