Advertisement

Redirect Generator

Generate redirect rules free: Apache .htaccess, Nginx, Netlify and JavaScript. Enter the old and new URLs, pick 301 or 302, and copy the ready-to-paste rule.

Redirect details

Your redirect rule

Advertisement

How it works

Enter the old URL and where it should point now, choose 301 (permanent) or 302 (temporary), and pick your platform. The tool generates the exact rule for Apache .htaccess, Nginx, Netlify _redirects, JavaScript, or an HTML meta refresh, ready to copy and paste. The source URL is normalized to its path automatically.

301 vs 302

Use 301 when a page has moved permanently: search engines transfer ranking signals to the new URL. Use 302 for temporary moves like maintenance or A/B tests. Server-side redirects (Apache, Nginx) are best for SEO; JavaScript and meta refresh are fallbacks when you cannot touch the server.

Redirect Generator FAQs

When should I use 301 vs 302?
301 for permanent moves (passing SEO value to the new URL), 302 for temporary ones like maintenance pages or tests.
Which format do I need?
Apache/.htaccess for most shared hosting, Nginx for VPS or cloud servers, Netlify _redirects for Netlify sites, JavaScript or meta refresh when you cannot change server config.
Do I need the full old URL?
You can paste the full URL; the tool extracts just the path, which is what server rules need.
Why is JavaScript redirect weaker for SEO?
Search engines may not execute it reliably, so link value might not transfer. A server 301 is always the safer choice when available.
Is this tool free?
Yes, free with no sign-up, running entirely in your browser.
Advertisement