Free · no sign-up · auto-validation

Redirect Generator

Create redirect rules for site migrations in multiple formats. Enter URLs manually or import via CSV with loop and chain validation.

Source URL (from)
Destination URL (to)
.htaccess
Fill in the URLs and click "Generate redirects" to see the output.
Output format
Redirect type
Domain (optional)
Trailing slash
Query string
Security

Always back up before editing. A syntax error can take your site down.

Above 200 redirects .htaccess impacts performance. Use "PHP Front-controller".

What are HTTP redirects and why they matter for SEO

HTTP redirects are instructions that tell browsers and search bots that a URL has moved to a new address. When configured correctly, they preserve organic traffic, backlink authority, and user experience during site migrations, URL restructures, or domain changes.

A 301 (Moved Permanently) redirect transfers virtually all SEO value — including PageRank, domain authority, and keyword relevance — to the new URL. A 302 (Found/Temporary) redirect does not transfer this value reliably. Using 302 when you need 301 is one of the costliest mistakes in SEO migrations.

Difference between 301, 302, 307 and 308: which one to use?

Choosing the correct status code is critical for preserving your SEO:

  • 301 — Moved Permanently: Use for permanent changes: domain migration, HTTP→HTTPS, URL restructuring. Transfers link juice and instructs Google to update its index.
  • 302 — Found (Temporary): Use only for temporary changes: A/B tests, scheduled maintenance, seasonal promotions. Does not reliably transfer link juice.
  • 307 — Temporary Redirect Strict: Similar to 302 but preserves HTTP method (POST/GET). Ideal for APIs and forms that cannot lose data during redirect.
  • 308 — Permanent Redirect Strict: Similar to 301 but preserves HTTP method. Use for permanent API migrations or endpoints requiring method preservation.

Differences between output formats

Each format serves a specific environment. Choose based on your infrastructure:

FormatWhen to useSyntax example
.htaccess (Apache)Shared hosting, WordPress, PHP sitesRewriteRule ^old$ /new [R=301,L]
NginxVPS, cloud servers with Nginxreturn 301 /new;
PHPWhen cannot edit server configheader("Location: /new", true, 301);
JavaScriptSPAs (Next.js, Nuxt, React Router)Response.redirect("/new", 301)
Cloudflare BulkAny site behind Cloudflaresource_url,target_url,status_code
Cloudflare PagesSites on Cloudflare Pages/old /new 301
Cloudflare WorkerAdvanced logic, Edge computingreturn Response.redirect(url, 301)

Real-world use cases for redirects

Well-configured redirects solve common SEO and infrastructure problems:

🔄 Domain migration

When moving from oldsite.com to newsite.com, configure 301 redirects from all old URLs to their new counterparts. This preserves rankings, backlinks, and organic traffic.

🔒 HTTP to HTTPS migration

Redirect all HTTP traffic to HTTPS with a single rule. Essential for security, Core Web Vitals, and Google ranking factor.

🗂️ URL structure restructuring

When changing permalink structure (e.g., /blog/2023/post → /articles/post), redirects prevent 404 errors and traffic loss.

🧹 Content cleanup

When removing obsolete pages, redirect to relevant related content instead of returning 404. This retains users and SEO value.

Best practices for redirects in SEO

Follow these guidelines to maximize the positive impact of redirects:

  • ✅ Always use 301 for permanent changes — never 302
  • ✅ Redirect directly to the final URL (avoid chains A→B→C)
  • ✅ Preserve URL structure whenever possible
  • ✅ Test all redirects before deploying to production
  • ✅ Monitor 404 errors in Google Search Console post-migration
  • ✅ Preserve important UTM parameters and query strings
  • ✅ Document all changes for future audit

Loops, chains and common errors: how to diagnose and fix

Redirect issues can crash your traffic. Understand the main ones:

🔄 Redirect Loop

Occurs when A redirects to B and B redirects back to A (or in a circular chain). Browser shows "ERR_TOO_MANY_REDIRECTS". Solution: Use this tool to detect loops automatically and review your rules.

⚡ Redirect Chain

Sequence of redirects: A → B → C → D. Each hop adds 50-200ms latency and may prevent Google from following to the end. Solution: Redirect directly: A → D.

❌ Redirect to 404

Redirecting to a non-existent page creates a double error. Solution: Validate destination before implementing and monitor with crawl tools.

🔀 Loss of parameters

Query strings like ?utm_source=google may be lost. Solution: Enable "Keep query string" option in this tool.

Performance and scalability of redirects

Too many redirects can impact server performance. Guidelines:

  • Up to 200 rules: .htaccess or Nginx are suitable. Minimal performance impact.
  • 200–2,000 rules: Consider RewriteMap (Apache) or maps in Nginx for better performance.
  • 2,000+ rules: Use PHP Front-controller with cache (APCu/Redis) or Cloudflare Bulk Redirects for scalability.

Frequently asked questions about redirects and SEO

What is the difference between 301 and 302?

301 is permanent and transfers SEO; 302 is temporary and does not transfer reliably. Use 301 for definitive migrations.

What is redirect loop and how to fix it?

Loop occurs when A → B and B → A. Use this tool to detect automatically and review your rules to break the cycle.

What is redirect chain and why avoid it?

Chain is A → B → C. Each hop adds latency and SEO loss risk. Redirect directly: A → C.

How many redirects does .htaccess support?

No technical limit, but above 200-500 impacts performance. Use PHP Front-controller for 10,000+ rules.

How to use redirects with Cloudflare?

Bulk Redirects (CSV) for large lists. _redirects for Pages. Worker for advanced edge logic.

Do redirects affect Core Web Vitals?

Yes. Each redirect adds a network round-trip. Long chains impact LCP and FID. Redirect directly to minimize impact.

Can I redirect with query strings?

Yes. Use the "Keep query string" option to preserve parameters like UTM, search filters, or sessions.

How to test redirects before publishing?

Use RankBox Redirect Checker to validate chains, detect loops, and measure response time before implementing in production.

🔗 Related tools: