.htaccess Generator

Build a .htaccess for Apache. Toggle HTTPS forcing, www↔non-www redirect, trailing-slash normalization, browser caching, gzip compression, security headers, common redirect patterns, and HTTP basic auth. Download ready-to-deploy.

Redirects

Caching & Compression

Security Headers

Misc

How to use the .htaccess Generator

Toggle the rules you want. The output is a complete .htaccess ready to drop at your domain root. Test in staging before production — a typo in mod_rewrite can take a whole site down with a 500. Hostinger and most shared hosts support every directive in the output.