Skip to content
Apache · Nginx · Next.js · Cloudflare · loop & chain detection

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.

2 rules
No loops, chains or duplicate sources across 2 rules

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
Reference

301 vs 302 vs 308 vs 307 — pick deliberately

StatusWhen to useHTTP methodSearch behavior
301 Moved PermanentlyThe 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 → GETSignals stay with the original URL
308 Permanent RedirectPermanent move where the HTTP method must be preserved — API endpoints, form handlers.Strictly preserved (POST stays POST)Same as 301 for search
307 Temporary RedirectTemporary move with method preservation — the strict sibling of 302.Strictly preservedSignals 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.

Field notes

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.

Redirect Rules Generator FAQs

Have more questions? Contact us

Trusted for Migrations

4.9
Based on 1,920 reviews

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.

H
Helen Zhao
SEO migration specialist
June 25, 2026

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.

S
Stefan Brandt
Platform engineer
May 19, 2026

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.

M
Marta Silva
Freelance web developer
April 12, 2026

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.

O
Owen Gallagher
E-commerce manager
March 21, 2026

Love using our calculator?

Connected instruments

More of SEO Forge

Learn More

Related Articles

Dive deeper with our expert guides and tutorials related to Redirect Rules Generator

Loading articles...

Apache · Nginx · Next.js · Cloudflare/Netlify · loop & chain detection · bulk import · in-browser · Last reviewed: 2026-07