Redirect rules generator
Domain change, HTTPS, www, old pages: get the exact redirect code for your server or host.
How to use the redirect rules generator
The exact code for your 301, 302 or 308 redirects on Apache, Nginx, Cloudflare, Netlify and Vercel.
-
Choose the scenario
Domain change, HTTPS and www, or a list of URLs.
-
Choose the platform
The code adapts to your server or host.
-
Copy or download
Then test before removing the old site.
About the redirect rules generator
A 301 redirect tells search engines that a page has moved permanently: most of its ranking is passed on to the new address. A 302 is temporary and should not be used for a migration.
When changing domain, redirect each old URL to its exact equivalent rather than everything to the home page, and keep the redirects in place for at least a year.
Frequently asked questions about the redirect rules generator
301 or 308?
Both are permanent. The 308 also guarantees that the method (POST, for example) is preserved; for ordinary web pages, 301 is still the most used.
How do I test a redirect?
With the curl -I command followed by the old URL, or a redirect checker: you should see the right status code and the Location header pointing to the new address, with no redirect chain.
Is my data sent over the internet?
No. Calculations run in your browser, and anything that is remembered stays on your device.
Is the tool free?
Yes, it is completely free and needs no sign-up.