1. Home
  2. Tools
  3. .htaccess Generator
Free tool

.htaccess Generator

Force HTTPS, www or non www redirects, custom error pages and caching rules.

Free, no sign up Runs in your browser
Paste at the top of public_html/.htaccess in cPanel File Manager. Keep a backup first.
Quick answer

The .htaccess file controls redirects and rules on Apache and LiteSpeed hosting. Wrong syntax gives a 500 error. This generator builds the common rules correctly: force HTTPS, choose www or non www, add 301 redirects for old pages, set custom error pages and turn on browser caching.

01How to use the .htaccess generator

  1. Tick the rules you want and fill in any redirects.
  2. Copy the generated file.
  3. Paste it at the top of the .htaccess in your public_html using cPanel File Manager. Keep a backup of the old one.

02Questions about this tool

My site shows error 500 after editing .htaccess. What now?
A syntax error. Restore the backup or remove the last block you added. Our support can fix it for hosted customers.
Does this work on LiteSpeed?
Yes. LiteSpeed reads the same .htaccess rules as Apache.
Should I use www or non www?
Either is fine. Pick one and redirect the other so Google sees one version of every page.
Chat with us
WhatsApp Get Quotation