How to Password-Protect a Folder in cPanel

Category: Security & SSL  •  Est. reading time: 2 minutes

Sometimes you want a folder on your site locked behind a username and password, like a staging area, a private download, or an admin section. cPanel’s Directory Privacy feature does exactly that, no coding required.

The Steps

  1. Log in to cPanel and open Directory Privacy in the Files section.
  2. Browse to and open the folder you want to protect.
  3. Check Password protect this directory, give it a name, and save.
  4. Back on the same screen, create a user by entering a username and password, then click to add the user.

From now on, anyone visiting that folder is prompted for those credentials before they can see anything inside.

Good to know: this protects the folder itself, so it is great for private areas. It is not a substitute for proper login security on an application like WordPress, which has its own accounts.

Need a private area set up right? Reach us at support@allydrez.com or 1-321-209-2004.