← Back to Tools

Redirect Generator

Zero-error forwarding code for Apache, Nginx, PHP, Cloudflare, Netlify, Vercel & more.

⚠️ Redirect Chain Risk: Your destination URL contains the same domain. Make sure this isn't already a redirect target elsewhere — chains hurt SEO and load speed.

Paste CSV: /old-page, https://site.com/new-page — one per line. Add a 3rd column for custom status: /old, https://site.com/new, 302

Paste your redirects to generate code →

Redirect Best Practices

Moving pages without redirects means 404 errors, lost rankings, and angry users. Here's what every format means and where to use it.

Apache (.htaccess)

Standard for shared hosting (cPanel, SiteGround, Bluehost). Place code at the top of your .htaccess file in your site root.

Nginx

For VPS/dedicated servers. Add inside your server { } block, before the location / block. Reload Nginx after saving.

Cloudflare / Netlify / Vercel

Modern edge platforms. Create a _redirects file (Cloudflare/Netlify) or add to vercel.json in your project root. Deploy to activate.

WordPress

Add to your theme's functions.php or a site-specific plugin. Use a child theme so updates don't erase your redirects.

301 vs 302 vs 307 vs 308

301 — permanent, passes link equity (best for SEO). 302/307 — temporary, no link equity passed. 307/308 — preserve POST method (use for form endpoints).

Avoid Redirect Chains

A → B → C costs speed and dilutes SEO. Always redirect directly to the final destination. Use our chain checker above to catch these before deploying.