Redirect Generator

301 redirect rules for Apache, Nginx, Netlify, Vercel and IIS, with loop checks.

About this tool

Paste old and new paths or full URLs, one pair per line separated by a space, comma, tab or arrow. Choose the status code and the server, and copy the rules. Warnings flag redirect loops, self-redirects and chains that pass through several hops.

Redirects that keep your rankings

When a page moves โ€” a site migration, a new URL structure, a renamed product, a blog that drops dates from its URLs โ€” every old address should send visitors and search engines to the new one with a permanent redirect. A 301 (or 308, which also keeps the request method) tells search engines to transfer the old page's ranking signals and replace it in results; without one, links and bookmarks hit a 404 and the ranking built up over years is lost. Use 302 or 307 only for genuinely temporary moves. Three mistakes are worth avoiding, and the checker catches them: loops (A to B and B to A), chains (A to B to C, which slow pages and dilute signals โ€” point A straight at C) and redirecting everything to the home page, which search engines treat as a soft 404. Keep redirects in place for at least a year, test on a staging copy, and update internal links to the new URLs rather than relying on redirects. The sitemap generator lists the new URLs, the robots.txt generator controls crawling, the URL parser splits addresses, the slug generator makes clean paths (What a URL slug is, and the rules for a clean one), and HTTP status codes explained โ€” the ones you'll actually meet, and what to do about them explains each code.

Frequently asked questions

What is the difference between a 301 and a 302 redirect?

301 is permanent: search engines move rankings to the new URL. 302 is temporary: they keep the old URL indexed. 308 and 307 are the same but preserve the request method.

Where do I put the rules?

Apache: the .htaccess file in the site root. Nginx: inside the server block. Netlify and Cloudflare Pages: a _redirects file in the publish folder. Vercel: vercel.json. IIS: web.config.

How long should I keep redirects?

At least a year, and ideally permanently for pages with backlinks. Removing them later sends old links to 404s again.

Is anything sent to a server?

No. The rules are generated in your browser.