Create .htaccess never been easier. This website is created to help you!

Your .htaccess File

You can create the .htaccess file using a good text editor like TextPad, UltraEdit and Microsoft WordPad. You cannot use Microsoft NotePad. An .htaccess file can contain a single or multiple lines depending upon the functions you want to include in it. You will need to use an FTP (File Transfer Protocol) program to upload the file. Also you must to upload the file in “ASCII” mode. Some FTP programs use “BINARY” as the default to upload files. If that’s the case you must change it to “ASCII”. Upload the file to the directory you want it to reside in. when you look at the files in your website’s directory you might not see it as your web server’s software is probably hiding it.

Your .htpasswd File

Rewrite none-WWW to WWW​

Redirects example.com to www.example.com

Redirecting HTTP to HTTPS

Using .htaccess redirect to https

Redirects http://example.com to https://example.com

Caching Javascript, CSS, and Images

Comma separated list. Omit leading “.”

Password protect file/folder (requires .htpasswd file)

.htpasswd Generator

Set username and password here to generate for .htpasswd file

Custom Error Pages (400, 401, 403, 404, 500, etc)

400: Bad Request

401: Auth Required

403: Forbidden

404: Not Found

500: Internal Server Error

Block or Allow an IP

Comma separated list

Comma separated list

Block BOT

Block Unwanted Bots by Useragent

Change default directory page

Change Default Dir to protect it from Exploit

Prevent Hotlinking

The domain that is hotlinking to you.

Comma separated list. Omit leading “.”

Optional. What to show instead of the intended image.

Prevent viewing of .htaccess file

Block access to .htaccess

Prevent Directory Listing

Block access to Directory Listing