...
Royalhost Blog
cPanel

How to use Directory Privacy (Directory Protection) in cPanel

cPanel Directory Privacy

Directory Protection allows you to set a password for a specific folder or directory so that when accessing the contents of the desired folder, it is impossible to access the contents without a username and Password specified in advance.


The function’s name in new versions of cPanel has been changed to the Privacy Directory.

Directory protection can be very useful for the security of some critical hosting folders or data protection.
You can easily activate directory protection on your site through this tutorial.

How to set a Password for a directory in cPanel

To set the Password for the directory in cPanel, you must use the privilege directory option.


To use directory protection in cPanel, follow these steps:

1- Log in to your cPanel account. If you need help accessing cPanel.
To enter cPanel, you can use the following instruction:
How to login to cPanel

2- Once logged in, navigate to the “Files” section of cPanel. The exact location may vary depending on your hosting provider’s setup, but you should be able to find it easily.

3- Look for “Directory Privacy” and Click on it to access the directory privacy settings.
You can also search the “Directory Privacy” in the cPanel search section.

4- On the Directory Privacy page, You’ll see a list of directories in your cPanel account. Find and select the directory you want to protect and click on the “Edit” button next to it.

5- On the next page, you’ll see an option to “Password protect this directory.” Enable the option by ticking the checkbox.

6- Enter a name for the protected directory. This name will be displayed to users when prompted for a password.

Then the following message will be displayed to you:
Success: The system sets the access permissions for the directory.
Click on the Go Back option.

7- Set a username and Password for the directory

Now a section called Create User will be displayed. In this section, enter the username and Password for the directory you want to protect.
You can either use an existing cPanel account or create a new one specifically for this purpose.

Click the “Save” or “Save Changes” button to apply the directory protection settings.

Once saved, any user accessing the protected directory through a web browser will be prompted for a username and Password. Only users with valid credentials can access the directory and its contents.

It’s worth noting that cPanel’s directory protection is a basic level of security and may need to be more suitable for highly sensitive data or applications. Consider using more robust access control mechanisms or consulting with a security professional for advanced security needs.

Related posts

How to Create Email Forwarders in cPanel

admin

How login webmail and email accounts in cPanel

admin

How to login to cPanel

admin

Leave a Comment