How do I password protect a directory?

From within cPanel you can password protect a folder. This allows you to require a username and password to access a folder or folders from the web. First log in to your cPanel:

Once logged in, towards the bottom of the page click on Password Protect Directories

A window will popup asking you which directory to open. Select Web Root and the clickGo.

The Password Protect Directories page will now open. You will see a listing of the folders inside your public_html folder. You can select a folder you wish to protect by clicking on the folder name, or you can open a folder to select a folder within by clicking on its icon. For this example we will protect the images folder by clicking on its name.

We now need to complete some settings and add a user that has access to the protected folder. In the Security Settings section tick on the box next to Password protect this directory: and enter a Name for the protected directory. For this example we will give it the name Protected Images. Click Save.

A page will be shown as below notifying you the access permissions for the directory have been set. Click Go Back.

We should now add a user that will be given access to the protected folder. Enter aUsername, then enter a New Password and New Password (again). When ready clickAdd/modify authorized user.

At the bottom of the page you will now notice a user has been added to the Authorized Users section. If you wish you can create another user or delete a user.

You should also notice that within the folder listing of the Password Protect Directories page there is a padlock beside the folder name indicating that it's a password protected folder.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I backup my site?

To backup your website, or parts of it (Home Directory, MySQL etc) first log in to your cPanel:...

How do I use the File Manager?

From within cPanel you can access your online File Manager. This allows you to manage the...

How do I create a MySQL database and user?

Below is a guide to creating a MySQL Database. MySQL databases are used by many web applications...

How do I administer my MySQL database?

To administer/manage your MySQL database we provide the popular program phpMyAdmin. The program...

How do I view my website statistics?

We provide several different statistics programs within cPanel for you to view and analyse your...