Dev Tools
.htaccess Generator
Redirects, HTTPS, directory protection, Cache, Gzip — choose and build.
Esc Clear
.htaccess Code
Select options to build your .htaccess file
What does .htaccess Generator?
Generate .htaccess rules for redirects, security headers, and more.
How to use .htaccess Generator?
- Select the type of rule you need (redirect, HTTPS, cache control, etc.).
- Fill in the required parameters.
- Copy the generated .htaccess code to your server.
Key features
- Supports 301/302 redirects, HTTPS enforcement, and CORS rules.
- Password protection and directory listing rules.
- Browser caching and compression headers.
Frequently asked questions
What is an .htaccess file?
An .htaccess file is a configuration file used by Apache web servers to control directory-level settings.
Where do I put the .htaccess file?
Place it in the root directory of your website or in any subdirectory where you want the rules to apply.
Is this tool free?
Yes, this tool is completely free and requires no registration.
Is my data saved?
No. All calculations happen in your browser only — no data is sent to any server.