Password Protect a Directory

This demo will show you how to password protect a directory through your cPanel. Password protecting a directory makes it so that a log in prompt appears when you attempt to view the directory in your internet browser. A visitor will only be able to view the contents of the directory if they have a valid username and password.

Password protecting a directory will also cause any directories within the password protected directory to be password protected as well. For example, if the following directory:

http://example.com/stuff/

was password protected any folders within the "stuff" folder would be password protected as well, such as:

http://example.com/stuff/notes/



[1] Click on the "Password Protect Directories" icon within the "Security" section of your cPanel

[2] Select the document root folder you wish to start in

[3] Click the "Go" button

[4] Locate the folder that you're wanting to password protect. You can navigate into a folder by clicking on the folder icon that's next to the folder's name.

[5] Once you've located the folder you want to password protect, click on the name of the folder

[6] Checkbox "Password protect this directory"

[7] Enter the name of your protected directory in the "Name the protected directory" field (it can be anything you like)

[8] Click the "Save" button

[9] Click "Go Back"

[10] Enter your desired username into the "Username" field

[11] Enter your desired password into the 2 password fields or use the "Password Generator"

[12] Click the "Add/modify authorized user" button






  • 86 Users Found This Useful
Was this answer helpful?