.htaccess Redirect Generator
Create 301 redirect rules and force HTTPS or www in .htaccess. Free, private and instant.
How to use the .htaccess Redirect Generator
- Enter each redirect as the old path, a space, then the full new URL, one per line.
- Choose whether to force HTTPS and how to handle www.
- Copy the rules to the .htaccess file on your Apache server, above other rules where appropriate.
Example
Worked example (run through this tool)
- Input: /old-page/ https://example.com/new-page/ and /blog/old-post to /blog/new-post, force HTTPS
- Result: RewriteEngine On, a rule that redirects http to https with a 301, then Redirect 301 lines for each pair
Limitations
- For Apache servers only. Nginx, IIS and many managed hosts use different configuration.
- A mistake in .htaccess can cause a 500 error for the whole site, so back up the file and test after uploading.
- Check the final redirects with the Redirect Checker and avoid chains of several hops.
About this tool
Generate Apache redirect rules for moved pages, forcing HTTPS and choosing between www and non-www.
.htaccess Redirect Generator is part of ToolStack Hub's SEO & Marketing Tools. It runs entirely in your browser, which keeps your data private and makes results instant. There is nothing to install and no account to create. There is no usage limit.
Frequently asked questions
Is the .htaccess Redirect Generator free?
Yes. .htaccess Redirect Generator is completely free with no sign-up, limits or watermarks.
Is my data private when I use the .htaccess Redirect Generator?
Yes. It runs in your browser, so your input is not uploaded to our servers.
Does it work on mobile?
Yes. ToolStack Hub tools work on phones, tablets and desktop browsers.
Keep going
Need this automated for your business?
Vantalume builds custom AI and web automation workflows so your team can stop doing repetitive work.