How to password protect your website

.htaccess files are the files typically used for managing access permissions. They can be put inside your htdocs directory, and sub directories, which configure how the web server controls web access to that directory.

You need to have a Standard Web or higher level of account to use .htaccess protection.

There are some good references on the web already covering .htaccess files:

The Authname is what the user will see when they are prompted for a password.

The AuthUserFile is where you store the .htpasswd file which you create next.

4. Now create a new file in the directory that you specified in the AuthUserFile field and add the username and encrypted password information which can be created using our password generator http://www.gradwell.com/htpasswd.

We recommend that you place the files containing your user names and passwords in the "~/webs/" directory, so that they are not accessible from the internet

Advanced Settings and Troubleshooting

If you are using a Web Standard or higher account and wish to create the .htpasswd file using the command line then you will need to do the following:

To give the user ‘alice’ access to a website, use the following command:

htpasswd -c /home/youruser/webs/.www-domain-dom-passwd alice

You will then be prompted for Alice's password. To add further users run the same command, but with out the -c option. Now try and access the website. You should be prompted for a user name and password.