domain names uk - - 0800 0960 160
Not Logged In
Password Protection (web)

Before you start you will need a text editor programme (like Windows Notepad or Simple Text)

An htaccess file is a simple ASCII file, created with a text editor like NotePad or SimpleText. Many people seem to have some confusion over the naming convention for the file. .htaccess is the file extension. It is not filename.htaccess or somepage.htaccess, it is simply named .htaccess.

In order to create the file, open up a text editor and save an empty page as .htaccess. Chances are that your editor will append its default file extension to the name (e.g. for Notepad it would call the file .htaccess.txt). You must remove the default .txt or whatever file extension it applies.

1. Create a file called ".htaccess" using a text editor, the contents of your .htaccess file should look something like this:

order allow,deny
allow from all
require valid-user
AuthName "My Password Protected Folder"
AuthType Basic
AuthUserFile /home/<username>/public_html/<folder>/<pwd file>

Create this file and upload it to the web folder that you want to protect.

2. Create the password file. You must use the same filename which you specified in your ".htaccess" file above for "<pwd file>". Your password file will look something like this:


The username is specified on the left of the ":" and the password is on the right of the ":". Notice that the password must be encrypted. Use the box below to generate the encrypted password for use in your password file:

Instant Password Encryption for use with .htaccess files

Password to be encrypted:     

3. Once you have created your password file, upload it to the folder you specified in your .htaccess file as "AuthUserFile". When you attempt to connect to that folder using your browser you should now see a box appear requesting a username and password for access to this folder.

Password Protecting a Web Site Directory in Frontpage 2000/2002

1. Start Frontpage and open the local copy of your web site.

2. Convert the folder you wish to protect into a subweb by right-clicking on the folder and selecting "Convert to web"

3. Open this subweb folder and publish it to the server. Take care to give it the correct path (i.e. http://www.<your domain>/protect and not http://www.<your domain>) otherwise you will overwrite the your main site.

4. Allow the publishing to complete and close the web.

5. Now use File | Open Web and enter the address of your new subweb (i.e. http://www.<your domain>/protect).

4. Select Tools | Security | Permissions.

5. On the Settings tab, select "Use unique permissions for this web". Click Apply before proceeding.

6. On the Users tab, select the radio button "Only registered users have browse access". Click Apply.

7. Browsing to the subweb is now retricted to the site user. When you browse the folder (e.g. http://www.<your domain>/protect) you will get a username and password box into which you now have to enter your Frontpage username and password to gain access.

8. Do not add or remove any other users otherwise you may cause problems next time to come to make changes to your site.

spacerVersion 1.2.0 - © 2005-2018 Nexus Data Systems Ltd
Please read our Disclaimer, our Privacy Statement and our Terms and Conditions.