How to password protect directories
The password protection feature of your SiteAdmin/cPanel allows you to restrict the general public from accessing specified folders/directories within your website.
Before we show you how to enable/disable the service its important to understand how password protection on a folder works. When you choose to password protect a directory in your control panel, SiteAdmin/cPanel will create a rule in your .htaccess file. This rule specifies that the folder is protected and the visitor will need to provide a valid username and password to log in and view the files.
Note: When you grant access through password protection, you are not only granting access for that folder, but any subfolders located within it. Also, by password protecting a directory and gain access to any subfolders in that directory you must provide the login credentials to do so.
Setup Password Protection In SiteAdmin
This demo assumes you’ve already logged in to SiteAdmin
Now let’s see how to setup password protected directories.
Note: If the folder does not presently exist, please create the folder using the FTP program of your choice or using File Manager.
3) Select the directory you wish to protect by clicking on its name.
6) Now that the directory is protected, we will now create username/password combinations that will allow you or others to access the folder.
Thats it! You successfully added a user to this folder.
If you wish to add more users or remove users from a protected directory simply click on the directory name once again.
1) To add another user simply enter the details and select Add New User
2) You can delete a user by clicking the X next to the users name.
That’s it! You should now be prompted to enter a username/password when accessing the folder via the web.
Setup Password Protection In cPanel
This demo assumes you’ve already logged in to cPanel
Now let’s learn how to password protect a directory, so that people will need a password to view web pages within it
We must therefore create at least one user, and assign them a password to access the directory
8) Then enter and confirm a password
For information on how to create a secure password, please click here.
This is the end of the tutorial. You now know how to password protect directories, and assign users to them