HTML Basix - HTML tutorials and online webmaster tools

Htaccess code generators Code generators Tutorials

Online and offline code generators

Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.

Password Protection Code Generator

Password protect folders using htaccess. Users will need to enter their username and password to gain access to the folder.
  • Enter your username
  • Enter your password
  • Enter the full server path to where the htpasswd file will be stored. This is best if it can be stored 'outside' web-accessed areas, such as in a folder alongside your public_html file (or something similar). If this is not possible, then either another folder or the same folder. We just need the full path to where it is!
  • Enter the message you wish to have displayed on the windows box which pops up.
  • Copy the first piece of code and paste it into notepad and save it as htaccess.txt. Upload it in ASCII format to the folder you wish to protect and rename it to .htaccess (remember the dot!!)
  • Copy the second piece of code and paste it into notepad and save it as htpasswd.txt. Upload it in ASCII format to the folder you stated in the path (or the same folder as the .htaccess file) and rename it to .htpasswd (remember the dot!!)
  • Unless you have your ftp program set to show invisible files, the file will then disappear from sight. Don't worry, it's still there!
  • If you have an existing htaccess file, copy and paste the generated code into that.

username and password details
path to password file:
server path, NOT url.
message for popup:


Page will open in a new window

Site Stats     
Total: 8,980,558 Total: 25,189,491
Today: 678 Today: 2,967
Yesterday: 1,047 Yesterday: 6,237
Past Month: 32,457 Past Month: 193,347

920 visitors in the last 24 hours
This page has been visited 201,817 times
There are currently 6 visitors online
click to see where
most people online at once:
286 visitors on 06/27/2012
   You beaut

This site is © HTML Basix 2003 - 2009