.htaccess Generator

Generate Apache .htaccess rules: force HTTPS, www or non-www, WordPress permalinks, browser caching, GZIP compression, security headers, hotlink protection, custom error pages and IP blocking.

Runs locally — nothing is uploaded

Domain & URLs

WordPress

Performance & security

.htaccess

How to use .htaccess Generator

  1. Tick the rules you need and fill in your domain.
  2. Review the generated file.
  3. Upload .htaccess to your site root (back up the old one first).

FAQ

Will this work on Hostinger and cPanel hosts?

Yes — they run Apache or LiteSpeed, which read .htaccess. Nginx servers ignore it; use the redirect generator’s Nginx output there.

Where do the WordPress rules go?

Keep the # BEGIN WordPress block intact; WordPress may rewrite it when you save permalinks. Put your own rules above it.

Popular searches

People find .htaccess Generator by searching for:

  • htaccess generator
  • force https htaccess
  • www to non-www redirect
  • wordpress htaccess
  • htaccess browser caching
  • htaccess security headers