Common rules covered
HTTPS and www redirects, custom error pages, caching, gzip and basic security rules.
Toggle common Apache rules to build a ready-to-use .htaccess file for redirects, caching, compression and security.
🔒 Your settings stay on your device and are never uploaded.
The .htaccess file controls redirects, caching, compression and access rules on Apache servers, but the mod_rewrite syntax is easy to get wrong. Toggle the rules you need here and copy a tested, ready-to-use file.
HTTPS and www redirects, custom error pages, caching, gzip and basic security rules.
www and non-www redirects cannot both be active, and the tool prevents that combination.
The file is generated entirely in your browser. Nothing is uploaded.
Place it in the root directory of your Apache-hosted website. It must be named exactly .htaccess, including the leading dot.
No. .htaccess files only work on Apache servers or Apache-compatible configurations. Nginx requires different directives in its server block.
Yes, for the HTTPS and www redirect rules. Most shared hosting providers enable mod_rewrite by default.
No. The file is generated entirely in your browser.