24/7 U.S. Support – 877-595-4482
If you want to have a folder (or a directory) of your website password protected so that only people you allow can visit a page, you can add a password to the folder in your cPanel. In this article we'll show you how to setup password protection. As password protection is sometimes a temporary solution, we'll also show you how to remove password protection. If you are looking to password protect a single file, please see our other article: Password protecting a single file in .htaccess.
First, log into your cPanel and select "Password Protect Directories" under the "Security" sub-header:
A popup box will display asking which directory to open. Select the Web Root option and click on "Go":
From the list, choose the folder that you want to password protect. If you want to protect one of the folders listed in your public_html folder, simply click on the name of the folder. If you want to open a folder to protect a directory within a folder, click on the folder icon next to the folder you want to open. In this example, we will password protect the "calendar" folder by clicking on the "folder" link:
Click the box that says "password protect this directory" and then name the directory. After you have put in a name for the directory, click on Save:
A page will come up that confirms that it has been added. Now, Go Back to the previous page and under the "Create User" you can add usernames and passwords to access the password protected directory:
After you have created the user, it will display under "Authorized Users:"
There are some scenarios in which password protecting a directory is a temporary solution. For example, if you are testing a new site, you may block access to it until you are ready to launch the site. When you're ready to launch the site, you will need to remove the password protection. To do so:
|Email:||support@WebHostingHub.com||Ticket:||Submit a Support Ticket|
|Chat:||Click To Chat Now|