< All Topics

What is the process to protect a folder with username and password in cPanel?

A user can lock their directory with a password via the cPanel “Password Protected Directories” icon.


  • Sign in to your cPanel account.
  • Click ‘directory privacy’ in the files section.


  • Choose the option to open your folder.


  • Choose the name of the directory you want password protected.


  • Find the option “Security Settings“, and check the box present next to “Password protect this directory” after that enter the name for protected directory like “Password Protected Area“. Press the save button at the end.


  • Choose the ‘go back’ button.


  • Scroll down further and choose “Create User”, then fill in the username and password areas, generate your new password, copy the user name and password to a notepad. You may need that when you need to open the password-protected directory and then choose the “Save” option.


Also, try to open the password-protected directory in the browser through your URL www.example.com/myfolder that is password protected already, your browser may prompt you to enter the user details.

Scroll to Top