Redirect Rules Generator
Turn from → to pairs into ready-to-ship 301 rules for four platforms — with loop, chain and duplicate detection across the whole set before a single rule reaches production.
Drop into the site root (or merge with the existing .htaccess). Requires mod_alias.
# Apache .htaccess — permanent redirects Redirect 301 /old-pricing https://example.com/pricing Redirect 301 /blog/2019/launch-post https://example.com/blog/launch
301 vs 302 vs 308 vs 307 — pick deliberately
| Status | When to use | HTTP method | Search behavior |
|---|---|---|---|
| 301 Moved Permanently | The canonical choice for permanent moves — page renamed, domain migrated, URL structure changed. | May switch POST → GET (browsers historically do) | Passes ranking signals; caches aggressively |
| 302 Found (temporary) | Short-lived detours only: A/B tests, maintenance pages, geo-splash. Search engines keep the OLD URL indexed. | May switch POST → GET | Signals stay with the original URL |
| 308 Permanent Redirect | Permanent move where the HTTP method must be preserved — API endpoints, form handlers. | Strictly preserved (POST stays POST) | Same as 301 for search |
| 307 Temporary Redirect | Temporary move with method preservation — the strict sibling of 302. | Strictly preserved | Signals stay with the original URL |
Chain hygiene: always redirect to the final URL. Every extra hop adds a round-trip for users and dilutes crawl efficiency — and chains of three or more hops risk being abandoned by crawlers entirely. When you migrate a page that already had redirects pointing at it, update the old rules to the new destination rather than stacking a new hop on top. The issue panel above flags exactly these stacked chains before you ship them.
Redirects are where migrations live or die
A redirect is a promise: “the thing you wanted lives here now.” Kept properly — one hop, permanent status, exact destination — it transfers users, bookmarks, backlinks and ranking signals almost losslessly. Broken — chained, looped, pointed at a 404, or left as a “temporary” 302 for three years — it quietly bleeds every one of those. Site migrations succeed or fail almost entirely on the quality of the redirect map, which is why generating the rules from a reviewed pair list beats hand-editing server config every time.
The loop and chain detection here catches the failure modes that hand-written rules produce. A loop (/a → /b → /a) takes the page down completely — browsers give up with an error after ~20 hops. A chain (/a → /b → /c) usually comes from stacking migrations: the 2019 rules point at 2021 URLs which now redirect again. The fix the tool suggests is always the same — repoint the oldest rule directly at the final destination. Duplicate sources matter too: in most servers only the first matching rule fires, so the second is dead config that confuses the next maintainer.
The four output formats cover the common stacks with their real syntax quirks handled. Apache's Redirect directive matches path prefixes; Nginx exact-match location = blocks are the fastest dispatch the server offers and avoid accidental prefix captures; Next.js permanent: true emits a 308 (method-preserving — usually what you want); the _redirects flat file works on both Cloudflare Pages and Netlify. Whatever the platform, deploy to staging first and click through a sample — a typo in a redirect file fails loudly.
After shipping, verify the promises are kept: run the destination pages through SEO Audit Pro in live mode — its redirect-chain check renders every hop with status codes — update your sitemap to list only final URLs in the Sitemap Studio, and make sure nothing in robots.txt blocks crawlers from discovering the moves via the Robots.txt Studio.
Trusted for Migrations
“Ran a 1,400-URL domain migration through bulk paste and the chain detector immediately caught 60+ rules stacked on top of the client's 2021 redirects. Repointed them at final URLs before launch — that alone probably saved the migration. Four platform outputs from one reviewed list is exactly the right workflow.”
“The Nginx output using exact-match locations instead of naive rewrites shows whoever built this actually operates servers. Loop detection caught an a→b→a pair two of us had written independently in the same sprint. The _redirects tab covers our Pages projects too.”
“I keep client redirect maps in a spreadsheet, paste two columns in, and get clean .htaccess out with problems flagged before anything ships. The 301 vs 308 table finally settled a debate with a client's API team — POST preservation was exactly their bug.”
“Used it for a category restructure — 300 rules, found four duplicate sources and one genuine loop. Would love regex/wildcard rule support for pattern moves someday, but for explicit one-to-one maps (which is what migrations should be anyway) it's flawless.”
Love using our calculator?
More of SEO Forge
Similar Calculators
More tools in the same category
SEO Audit Pro
Paste HTML or fetch a live URL and get a unified 85-check audit — on-page, technical, content, links, images, structured data and security — with weighted scores, a fix-first list and JSON/CSV/Markdown export.
SERP & Social Preview
Pixel-accurate Google SERP preview (desktop + mobile, canvas-measured Arial with query bolding) plus Facebook, X, LinkedIn, WhatsApp and Discord card mockups.
Meta Tags Studio
Build a complete, correct <head>: title and description with live character + pixel meters, canonical, robots directives, Open Graph and Twitter cards — copy one clean block.
Keyword Density & N-Grams
Exact keyword density, a placement matrix (title, H1, first 100 words, URL, alts), keyword proximity, 1–4-gram tables and top-word analysis — computed, not guessed.
Readability Scorer
All seven readability formulas — Flesch, Flesch–Kincaid, Gunning Fog, SMOG, Coleman–Liau, ARI, Dale–Chall — computed from first principles with per-sentence highlighting.
Robots.txt Studio
Generate robots.txt with AI-crawler policy presets (GPTBot, ClaudeBot, CCBot…) and test any URL against any file with RFC 9309 longest-match semantics — winning line highlighted.
Often Used Together
Complementary tools for complete analysis
Related Articles
Dive deeper with our expert guides and tutorials related to Redirect Rules Generator
Apache · Nginx · Next.js · Cloudflare/Netlify · loop & chain detection · bulk import · in-browser · Last reviewed: 2026-07