Handitab

.htaccess Generator

Generate an Apache .htaccess file with rules for HTTPS redirects, www handling, compression, browser caching, and a custom 404 page.

About .htaccess Generator

An .htaccess file is a per-directory configuration file read by the Apache web server on every request. This generator writes commonly used rules: a 301 redirect from HTTP to HTTPS, a redirect to or from the www host name, text compression with mod_deflate, cache lifetimes with mod_expires, a ban on directory listings, and a custom 404 document. Each block is wrapped in an IfModule test. It has no effect on Nginx or other servers.

How to use .htaccess Generator

  1. Fill in "Redirect HTTP to HTTPS", "www handling", "Compress text files" and "Cache static files in the browser", and the other options.
  2. The result appears below and updates as you type.
  3. Copy the result with the copy button, or download it as a file where that is offered.

Questions about .htaccess Generator

Where do I put the .htaccess file?

Upload it to the document root of the site, usually the public_html or www folder. The file name starts with a dot and has no extension. Rules apply to that folder and everything below it, provided the server allows overrides.

Runs in your browser. Page last updated .

More seo and web tools

All 12 seo and web tools