Create .htaccess redirect rules in seconds.
Choose what you want to do, fill in the details and copy the .htaccess rules. It runs in your browser, so nothing is sent or stored.
Generate your redirect rules
Pick a redirect type and fill in the fields. The rules update as you type.
Back up your current .htaccess file first, then add these lines near the top. They work on Apache and LiteSpeed servers.
What the redirect generator covers.
The redirects most sites need, written correctly.
Site-wide rules
Force HTTPS, and choose www or non-www so you have one version of your site.
- Force HTTPS
- www to non-www
- non-www to www
Page redirects
Redirect one old page, or a list of many pages, to new addresses with a 301.
- One page
- Many pages
- 301 permanent
Domain move
Send every page of an old domain to the same path on a new domain.
- Old and new domain
- Keeps the path
- 301 permanent
Three steps to useful results.
Choose a redirect type
Pick force HTTPS, a www rule, a page redirect or a domain move.
Fill in the details
Enter the old and new addresses where needed.
Copy, add and test
Back up your .htaccess, paste the rules near the top, then test them with our Redirect Checker.
.htaccess Redirect Generator FAQ
Common questions about this tool and what the results mean.
Ask us about your resultsWill this work on my host?
It works on Apache and LiteSpeed servers, which most shared hosts use. Nginx uses a different format.
Why use a 301 redirect?
A 301 tells search engines a page has moved permanently, so they pass the old page's signals to the new one.
What if my site breaks?
Restore your backup of the .htaccess file. Always keep a copy before you edit it.
How do I test my redirects?
Use our Redirect Checker to follow each step.
Want an expert to fix what the tool finds?
Our team turns diagnostics into a prioritized roadmap and does the work. Start with a free audit request.