.htaccess Redirect Generator
Create 301 redirects, HTTPS and www rules for Apache. Free, no sign-up, works in your browser.
Always keep a backup of your current .htaccess before replacing it.
🔒 100% private — processing happens in your browser. Nothing is uploaded.
How to use the htaccess redirect generator
- Tick HTTPS and choose www or non-www for your preferred domain.
- List old and new addresses for pages that moved, one pair per line.
- Copy the rules to the top of the .htaccess file in your site root (rename the download to .htaccess).
301 redirects keep visitors and search rankings when you change URLs, move to HTTPS or switch domains. The rules use mod_rewrite, available on almost every Apache and LiteSpeed host. Put them above other rules (for WordPress, above the “# BEGIN WordPress” block).