In this tutorial, AZDIGI will show you how to protect folders on cPanel by requiring access authentication.
If your website has resources (documents, applications…) that users can download, you need to create a folder to store resources so they can access and download them. However, when accessing, visitors must have login information to be able to enter.
Or, if you want someone to access the http://domain.com/wp-admin path, they must go through the verification step before login account. It can be said to authenticate two different accounts.
This will make your folders more secure and can only be accessed by authorized people.
II. Enable folder protection on cPanel
To enable folder protection on cPanel, we need to do the following 2 steps.
Step 1: Login to cPanel
To login to cPanel you just need to access the following link:
You need to change IP address to the IP your server is using, or more simply, if the domain is active on this cPanel hosting, you can change the IP to your domain as follows:
Below is my cPanel interface:
We continue to step 2 to enable folder protection on cPanel.
Step 2: Enable folder protection on cPanel
First, we access the FILES feature => select File Manager to access the file management section.
Next, visit the website’s source code directory. For example, I have created a directory called
and in this directory, I have prepared some files.
Go back to the website folder, right-click on this folder and select Password Protect.
Below is the interface to enable folder protection oncPanel.
To enable folder protection on cPanel, select “Password protect this directory.” at 1. then (2) will automatically create default information if you want to be able to edit and finally select SAVE.
A message that successfully sets permissions for this folder will appear, with content similar to the following:
Success: The system set the access permissions for the “/home/username/domain.com/taixuong” directory.
Then, select “Go Back” and continue to configure the credentials as shown below:
You enter your username in (1), password in (2) & (3), if you want cPanel to generate a password for you automatically, click Password Generator in (4). Then, click SAVE in (5).
Please save this password. As shown below, I have set the username “bao“.
Please try accessing that folder again. The screen will display the request to enter username and password:
After entering the login information, you can access the folder and see the files.
So you have successfully enabled folder protection on cPanel.
III. Disable folder protection on cPanel
To disable the folder protection feature on cPanel, you can right-click the folder, do the same as step 2 and select Password Protect.
You need to untick “Password protect this directory.“. Then select SAVE, you will receive a message similar to the following:
Success: The system removed the access permissions for the “/home/username/domain.com/taixuong” directory.
With just 2 simple steps, you can successfully protect the folder on cPanel. You completely protect the wp-admin directory for your WordPress website to create an extra layer of security for the website’s login.
Hope this article will be of help to you. Wishing you success!
See more useful cPanel articles at the following link:
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 730 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: email@example.com .
- Register for cheap Hosting/VPS service here!