How to Password Protect a Directory in cPanel

  1. Login to cPanel control panel
  2. Find the Files section and click on Directory Privacy. You will see the list of sub-directories.
  3. Click on the sign icon which is present to the left of public_html to see the contents. You can see sub-directories of public_html.
  4. Select the subdirectory and click on it to update its access requirements.
  5. In the Security Settings, check the Password protect this directory checkbox.
  6. Enter the name of the protected directory.
  7. Click on the Save button.
  8. Scroll down the page, Add a username and password for that protected folder.
  9. Click on Add/modify the user.

Note:You can not protect your individual files, It supports only for folders.

Linux Hosting
Previous reading
How to Change PHP Version
Next reading
How to View Statistics of your Website in cPanel