Guides & Tutorials

hosting image

How to protect a folder with username and password in cPanel?

You can lock a directory or protect a folder with username and password in cPanel Hosting “Password Protected Directories” Option. Most of the websites provide you “secure website hosting”. Follow these steps to protect a folder in cPanel hosting.

  • Sign in to your cPanel account.
  • Go to “Files” section, click on “Directory Privacy” Icon.

protect a folder with username and password in cPanel

  • Click the icon to open a folder do not click on the name of folder.

protect a folder with username and password in cPanel

  • Now click on the name of directory/folder that you want to protect by password.

protect a folder with username and password in cPanel

  • Now checked the check box next to “Password protect this directory” and enter a name for the protected directory. Then click the “Save” button.

protect a folder with username and password in cPanel

  • Now click on the “Go back” button.

protect a folder with username and password in cPanel

  • Scroll down the page and under “Create User” enter the username and password copy this user/password to a notepad, because You will need this when you open your password-protected directory. Now just click on the “Save” button.

protect a folder with username and password in cPanel