You can lock a directory with password by using the cpanel "Password Protected Directories" Option.
1. Log into your cpanel account.
2. In the "Files" section, click on "Directory Privacy" Icon.

3. Click the icon to open a folder.
![]()
.. name of directory you want to protect by password.
5. Under "Security Settings", check the box next to "Password protect this directory" and enter a name for the protected directory like "Password Protected Area". Then click the "close" button.
6. Now. "Go back" button.
7. Scroll down the page and under "Create User" fill in the username and password fields or use the Password Generator option to generate a new random password and copy the user/password to a notepad. You will need this when you want to open your password-protected directory and. "close" button.
Now, should you try to open your password protected directory in your browser through the url www.example.com/myfolder, which is already password protected, your browser will prompt you to enter username and password.
Get Fast & Affordable Hosting in India
Start your website with SSD hosting, free SSL, cPanel, daily backups and 24/7 support from HostCupid.
Also explore: WordPress Hosting | Reseller Hosting | Domain Registration
Read the Complete Web Hosting Guide
- 0 Users Found This Useful
-
How to generate and download a full backup of your cpanel Account?
1. Log into your cpanel account.2. In the "Files" section, click on "Backup" Icon. 3. Under "Full...
How to generate a cpanel backup and sent to FTP Server?1. Log into your cpanel account.2. In the "Files" section, click on "Backup" Icon. 3. Under...
How to Restore cpanel Backup?1. Log into your cpanel account. 2. In the "Files" section, click on "Backup Wizard"...
How to Reset my cpanel Account Password?If you can access your cpanel account, follow these steps to reset your password:1. Log into your...
How to update your cpanel Contact Information or receive a notification on reaching quota limit?If you want to receive notification on reaching your disk quota, bandwidth usage limit, reaching...