How to protect a folder with a password

Anyone can access subdirectories of public_html (folder containing all the public files of your hosting account) using a web browser. To restrict access to a particular directory under public_html:

  1. Connect to cPanel
  2. Click Directory Confidentiality in the Security topic. There you will find a list of subfolders.
  3. Click the folder icon to the left of public_html to see its contents. You will now see the subdirectories of public_html.
  4. To select a folder to protect, click its link (not the icon).
  5. On the Security Settings page, select the Protect this directory with a password checkbox.
  6. In the Protected directory name field, enter the title you want to assign to the selected directory, for example 'My Protected Folder'.
  7. Click Save
  8. At the bottom of the page, create a username and password that will be used to access this folder.
  9. Click Add/Edit Authorized User
  10. Check that the chosen directory is well and truly secure with the information provided by accessing your page directly via your web browser.

Note: You can only protect folders, not individual files.


If you still have questions or concerns, feel free to contact us by opening a support ticket or by using our direct live chat feature to talk with our support team.

  • cPanel, mot de passe, Password, Aide
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

 How to empty my DNS cache

Overview Your DNS cache stores the locations (IP addresses) of web servers that contain web...

 What is cPanel?

cPanel is a control panel with which you can manage almost any element of your cPanel hosting...

 How cPanel & WHM Improved Email Hosting

cPanel and WHM have gone through some serious upgrades to their Email Hosting features...

 CURL: could not resolve host: cpanel.net

Error: curl: (6) Could not resolve host: securedownloads.cpanel.net; Unknown error Fix:...

 How can I activate my paid license after a trial?

You can do this by running this command in SSH: /usr/local/cpanel/cpkeyclt It should...