cPanel Tutorial on cPanel Directory Privacy

this feature of cpanel allows us to protect certain directories with a username and password. if a directory is protected by this, then if somebody from the front end of your website tries to access the file, they will be prompted to provide a username and password, if username of password does not match, then the user will not be able to see the content of that directory.

to configure a password for a directory, use the following steps −

step 1 − open directory privacy configuration by clicking directory privacy in the files section.

directory privacy

step 2 − navigate within your directories to find the directory you want to protect. use icon on the left hand side to open a directory.

privacy

step 3 − select the directory you want to protect by clicking on the name of the folder, you will get same configuration as shown below.

directory privacy1

step 4 − select password protect for this directory checkbox and enter a label which you wish to display in the frontend, click save to protect this directory.

step 5 − to give access to users, you will need to create users. enter username and password to create a new user, who will have access to this directory from the frontend.

step 6 − click save to give access to this user. you can also create more than one user here.

if you now try to access your password protected directory, you will get a prompt like this −

authentication

you can now enter the username and password to access this directory.