Free Online .htaccess Generator
Generate safe Apache rewrite rules for HTTPS, redirects, and IP blocking.
Back up your existing .htaccess file before uploading. These rules are for Apache; Nginx uses a different configuration format.
About the .htaccess Generator
Free .htaccess generator for Apache. Create rules for HTTPS redirects, www changes, 301 redirects, and IP blocking.
How to use this tool
Use the controls above to enter your values, choose your options, and view the result. The tool updates as you work, and the result can be copied or downloaded where supported.
Frequently asked questions
Is this tool free?
Yes. Every tool on ImGenerate is free to use and does not require an account.
Is my data safe?
Tools that run entirely in the browser keep your data on your device. Any server-backed lookup is noted in the tool and only sends the information needed for the result.