Htaccess Generator
Create Apache .htaccess rules without learning server syntax — enter your domain, tick the options you need, and get ready-to-use code for HTTPS redirects, www control, browser caching, GZIP and hotlink protection.
Redirects
Performance
Security
Upload this file to your website's root folder (where the index file is) with the name
.htaccess. Take a backup of the old file first — a wrong rule can take your site down. These rules only work on Apache servers, not on Nginx.
How to use
- Enter your domain and select the options you need.
- Press Generate .htaccess.
- Copy the code or download the file, and save it in your hosting root folder as
.htaccess. - Open your site and check that everything works fine.
Tips
- Back up your existing .htaccess file before uploading a new one — a wrong rule can take your site down.
- Upload the file to the folder where your index file lives, usually public_html.
- These rules work on Apache servers only, not on Nginx.
- Test one option at a time so you know which rule caused a problem.
Frequently Asked Questions (FAQ)
What rules can this htaccess generator create?
HTTPS redirects, www or non-www rules, browser caching, GZIP compression and hotlink protection for Apache websites.
Do I need to know Apache syntax to use it?
No. Enter your domain and tick the options you want, and the tool writes the .htaccess code for you.
Where do I put the generated code?
Paste it into the .htaccess file in your website root folder, usually public_html.
Is it free?
Yes, it is free with no signup and runs in your browser.