How to Add Password Protection to a Directory In cPanel
cPanel is one of the most used and handful Linux-based graphical interfaces used by developers to manage their websites and organize their servers. As cPanel allows you to publish websites, manage domains, organize files, and create email accounts for your business, you need to make sure that you are doing everything you can to make it as secure as possible. If you want the best cloud cPanel hosting you can visit the linked website.
If your cPanel were to get into the hands of someone else, you could potentially lose your whole website. So, the best way to ensure the security of your control panel is to password protect important folders. It helps protect your important files even if a hacker or someone else gets control of your cPanel.
Protecting a directory using a password is a very simple task, which can be accomplished in just a few steps. In this article, I am going to highlight all the steps that you need to follow as it is so that you can add or remove the password to any directory in cPanel.
How Does it Work?
Before I dive deep into the technicality of things, let me jot down how everything works. When you choose to password protect a certain directory in cPanel, it automatically creates a rule in your file called .htaccess. This rule dictates that a certain folder is protected by a password, and if someone wished to see the contents of this folder, he would have to provide the right username and password, or else he will not be granted access. Once you have access to a directory, you can browse the content of all the subdirectories within.
As you know how password protection in cPanel works, let’s jump right into the steps that you need to follow as is.
Step 1: Log into your cPanel
Step 2: Find the files section in your cPanel and click on the directory privacy icon to open the settings.
Step 3: By clicking on the directory privacy icon, you will be directed to a folder containing all the directories within. Now, you need to find and select the directory that you want to password protect and click on it. Once you click on it, you will see the SET PERMISSIONS FOR “/HOME/ EXAMPLE/ EXAMPLE/” screen appear before you.
Step 4: Once you have the set permissions option cleared and you have selected the directory you want to protect, you will be presented with a checkbox labeled as PASSWORD PROTECT THIS DIRECTORY option. Click this checkbox to enable password protection. If you want to remove the password, you can come back to this option and uncheck it to remove the password.
Step 5: Right below the checkbox, you will have a blank space labeled as ENTER A NAME FOR THE PROTECTED DIRECTORY. After entering the name for the directory, you need to click the save button.
Step 6: In this step, you are going to have to create a username, enter a new password, and confirm your entered password for that specific directory. Once you have entered all the credentials, all you need to do is to click the save button, and the directory you have selected will be password protected.
Personal contact info – firstname.lastname@example.org
Permanent Address :- Montville, NJ
CEO and co-founder at Cloudsmallbusinessservice.com