Support Issues: Area Code Change
Internet Security

Email:
Download:
Other Info:
Password Protecting Your Webspace

Step 1 - Creating the .htaccess file
A .htaccess file will allow you to password protect certain directories in your webspace that you may not want to make available to the general public.

Begin by opening your favorite text editor (i.e. Notepad) and type the following information:

	AuthType Basic
	AuthUserFile /home/u/username/public_html/directory/.htpasswd
	AuthName Secret
	require valid-user
      

In the "AuthUserFile" line change the letter u "/u/" in the listed path to the first letter of your username and the word username "/username/" into your username. For example, someuser@netdoor.com would then make this line read:

	AuthUserFile /home/s/someuser/public_html/directory/.htpasswd
      

Also the word directory "/directory/" needs to be the directory or folder name where the .htpasswd file is to be located. Note: For security reasons it is always best to put your .htpasswd file into a different directory than your .htaccess file.

Once this is done you'll need to save the file as directed below.
  • Click on the FILE menu and select SAVE AS
  • Choose the location you want to save to
  • Select "All Files" in the "Save as type" box
  • Enter the name of the file as ".htaccess" (without the quotes)
  • Click the Save button

Step 2 - Creating the .htpasswd file
The .htpasswd file holds the password you wish to use to access this protected webspace.

Once again you will need to open your favorite text editor to create this file. First you will need to choose a password and encrypt this password for use in the .htpasswd file. Encrypting is a security measure that makes the password unreadable if anyone were to gain access to your .htpasswd file. You can use this link to encrypt the password.

Once there, enter a username used with your .htaccess file and the password chosen for that username and click the "Generate" button. The next page you see will include output similar to "someuser:8oYh2wr177j8o". Copy and paste the ouput to your text editor (be sure to get the whole line or it will not work) and then save it as ".htpasswd" in the same way that you saved your .htaccess file above.

Now you can upload the .htaccess file into the directory to be protected and the .htpasswd to the directory specified in your .htaccess file. Please note: When uploading text based files such as these, please make sure that you are uploading in ASCII format. Most FTP programs include this option.

If all goes well then upon accessing the directory containing the .htaccess file with your web browser you will be prompted for a username and password. Simply verify that the specified username and password allows access to that directory and you are done.

Troubleshooting

  • If you are not asked for the username and password, then make sure that your have uploaded the .htaccess to the correct directory.
  • If you are asked for a password and it does not accept it, then make sure the .htpasswd is in the directory specified in your .htaccess file.
  • If the .htpasswd is in the correct directory but it still does not allow access, make sure that you are typing in the username exactly as it is listed in the .htaccess and .htpasswd files.