.htaccess Redirect Generator
Create Apache redirect rules quickly.
Keep or share the finished result
Copy or share after running the tool. Saved tools and settings stay in this browser.
What would you like to do next?
Generate a simple .htaccess redirect
Redirects are easy to mistype when you are moving pages, cleaning up URLs or launching a new site. Enter the old path, new URL and status code, and this tool creates a simple Apache Redirect rule you can copy into an .htaccess file.
Use the right status code
Use 301 or 308 for permanent moves and 302 or 307 for temporary changes. Test redirects after deployment so you do not accidentally create loops or redirect important pages to the wrong place.
Frequently asked questions
When should I use 301?
Use 301 for a permanent move where the old URL should be replaced by the new one.
Where does the rule go?
It usually goes in the .htaccess file for an Apache site, if redirects are allowed there.
Can this create complex rewrite rules?
No. It creates simple Redirect rules for one old path at a time.