An .htaccess file is a powerful Apache server configuration file that controls redirects, security, caching, and performance for your website. Instead of editing raw directives by hand, use this generator to visually toggle the rules you need — then copy the finished file directly to your server.

Configure Rules

Force HTTPS
301 redirect
Force www / non-www
Custom Error Pages
Enable GZIP Compression
mod_deflate
Browser Caching
Block IP Addresses
URL Redirects
Hotlink Protection
block image theft
Directory Listing
PHP Settings
php_value

Generated .htaccess

.htaccess

How to deploy

Copy the generated code, save it as .htaccess and upload it to the root of your website (public_html or www folder). Requires an Apache server with AllowOverride All enabled.