Directory Protection

Directory Protection allows you to restrict access to a certain directory and only allow those visitors that have a valid username and password to access the contents of that directory and any files or directories below that directory. You can make as many username and passwords as you would like. It is somewhat common to only create one username and password and distribute that username and password to all users who need access. However, if you do not feel comfortable going about this way, then you can create any number of username and passwords.

When you click on the Directory Protection link in your Control Panel, you will be brought to a page that will list all directories in your public_html directory. You will only be able to password protect directories below your public_html directory.


Clicking on the folder icon will allow you to navigate into that directory. From there you can continue navigating your way until you get to the directory you want to password protect. To password protect a directory, click on the directory name.


You will now need to add a username and password. Scroll down towards the bottom to where it says Username: and Password:. Fill out the textboxes beside each field with the corresponding information you want. Then click on Add New User. You should get a page that says the user has been created with the stated password. Use the Go Back link. You should see the username you just created in the Active Users list.

Note: Just adding a user will not enable password protection, you will need to complete the next step.

Click the checkbox beside the lock icon at the top, where it says Folder requires a password to access via http://. Now you will also need to give the resource a name. The resource name can be anything. It is usually displayed in the username and password dialog box when a visitor attempts to enter a restricted area.


Now when you attempt to enter that directory through your web browser, you will get a dialog box similiar to the one below:


Other options availabe in the Directory Protection portion of your Control Panel allow you to delete a user and change the password of a user.

Back to Site ManagementPre-installed Scripts