.htaccess Generator

Build a working Apache .htaccess with HTTPS + canonical redirects, caching, compression and security headers.

Network & webApacheHtaccessRedirect
.htaccess Generator screenshot
Pick what you need

Blocks are emitted in a safe order: redirects, then HTTPS, then www, then caching, then compression, then security headers.

.htaccess

      

Save this as .htaccess in your document root. It only works on Apache and LiteSpeed.

Assembles a correct .htaccess from the blocks you actually need - HTTPS, redirects, caching, compression, security headers, SPA fallback - in a safe order.

More tools