.htaccess rule builder

Generate starter .htaccess blocks for static-site canonical rules.

Choose common Apache/cPanel rules for HTTPS, www or non-www, clean index.html redirects, custom 404 handling, security headers, compression, and caching.

Important caution

Incorrect .htaccess rules can break a site, create redirect loops, cause 403 errors, or block files. Back up the existing file and test carefully after every change.

Generated starter rules