Skip to content
SCRAWL

Redirect Rule Generator — Export Server Rules

Free redirect rule generator. Paste URL pairs, detect chains and loops, export Apache, Nginx, Cloudflare, Vercel, Next.js, or Netlify rules. Client-side.

  • Paste or upload URL pairs
  • Review warnings
  • Export server rules
  • Browser-based — no install
  • Instant results

Paste or upload old→new URL pairs, pick 301/302/307/308, and export redirect rules for Apache, Nginx, Cloudflare, Vercel, Next.js, or Netlify. The tool flags chains, loops, duplicates, and conflicting sources before you copy anything.

Step-by-step guide
Redirect Rule Generator — Apache, Nginx,

Most migration post-mortems mention content or design. The quiet killer is redirects: a missing 301, a chain left over from three platform changes, or two conflicting rules fighting for the same old path. This guide is about planning the URL map and writing rules for the stack you run — Apache, Nginx, Cloudflare, Vercel, Next.js, or Netlify. When you already have a spreadsheet of old and new URLs and need deployable syntax with chain checks, use the Redirect Rule Generator . It runs in the browser and flags loops before you paste into production. Start with the URL map, not the config file A redirect map is two columns: every old URL that still matters, and exactly one destination that should replace it. "Matters" means organic traffic, backlinks, ads, email links, or internal links from pages you are keeping. Build the list from more than one source. Export Search Console landing pages, crawl your old sitemap, pull top paths from analytics, and ask client stakeholders for printed URLs. Merge and dedupe. Sort by importance so you fix high-value rows first when something is wrong. Each row should be one hop in the final world: old path → new path. If your spreadsheet already has A→B and B→C because teams added rules incrementally, compose those mentally to A→C before you write server config. Chains add latency and dilute the signal passed to the destination. Google’s site-move documentation assumes you consolidate to direct redirects where possible. Avoid the homepage dump. Sending thousands of product URLs to the homepage path looks like a soft 404 to users and a weak relevance signal to search engines. Map like for like when content survives; use a sensible category hub when a section merges; use 410 or removal when content is truly gone. Choose the status…

Read the full guide

Paste your migration map

Each line is one redirect: old URL or path, then new destination. Commas, tabs, or spaces work. You can upload a CSV export from a spreadsheet. Nothing is sent to Scrawl — parsing and validation run in your browser.

Pick a status code and output format

Choose 301, 302, 307, or 308 once for the whole export. Toggle full URL when your server expects absolute URLs (common on CDN bulk imports). Strip trailing slash keeps paths consistent so duplicate rules do not diverge on /page vs /page/.

Read the warning panel before export

The checker flags self-redirects, invalid URLs, duplicate or conflicting sources, redirect chains (A→B→C), loops, mixed hostnames, trailing-slash mismatches, case variants, and rows with query strings. Errors mean the map will break if deployed as-is. Warnings mean review — chains waste crawl budget until you flatten them.

Use Flatten chains to rewrite sources so each old URL points at the final destination in one hop (still verify on staging). For planning migrations and server syntax details, read the redirect rule generator guide.

Export and verify live

Copy or download Apache RewriteRule / Redirect lines, Nginx rewrite or return, Cloudflare Bulk Redirects CSV plus sample expression rules, vercel.json, next.config JSON, or Netlify _redirects. After deploy, spot-check with the Bulk Redirect Checker and Redirect Chain Checker.

Frequently Asked Questions

What input formats does the Redirect Rule Generator accept?

Paste one old→new pair per line using commas, tabs, or spaces, or upload a CSV with optional header row (old/new or source/destination). Paths can be root-relative (/old) or full URLs. The tool skips blank lines and # comments.

How does flattening redirect chains work?

When your map contains A→B and B→C, the live site would chain. Flatten composes those rows so A points directly to C while keeping B→C. Export after flattening if you want single-hop rules on the server. Always confirm on staging — some platforms still apply other global rules.

Which redirect status code should I use?

Permanent moves (migrations, HTTPS, domain changes) use 301 or 308. Temporary campaigns or A/B tests use 302 or 307. Google treats 301/308 as permanent for indexing; 302/307 may leave the old URL in the index longer.

Does this tool deploy redirects to my server?

No. It generates text you copy into .htaccess, Nginx, Cloudflare, Vercel, Next.js, or Netlify. Deployment and reload are on your side. Use the Bulk Redirect Checker after go-live to confirm each old URL returns the expected code and target.

What is the difference between this and the Bulk Redirect Mapper?

The Bulk Redirect Mapper helps build pairs from two URL lists or fuzzy slug matching. The Redirect Rule Generator starts from pairs you already have, validates chains and conflicts, and exports more host formats including Cloudflare, Vercel, Next.js, and Netlify with a pre-export warning panel.