How to Password Protect a Directory in cPanel

You have the ability to password protect individual directories in your website to provide an extra level of protection for sensitive areas such as shopping cart admin areas.  The feature, called "Password Protect Directories," is accessible in your cPanel.  Here's how to password protect a directory:

  1. Log into cPanel by visiting http://yourdomain.com/cpanel (where "yourdomain.com" is your site's domain name)
  2. Click on "Password Protect Directories" in the "Security" area of cPanel
  3. Click "Go" in the box that appears (it is not necessary to change any of the default options)
  4. On the next page, navigate to the folder you wish to protect.  You can navigate within folders by clicking on the folder icon next to the name. 
  5. Select the folder you want to protect by clicking on it's name.
  6. Check the box named "Password protect this directory" and enter a name which describes what is being protected.  This name can be anything--it will appear in the login box when you try to access the folder on the web.  Common examples would be "Admin" or "Secure".  Click "Save".
    NOTE:
     Any folders that are within a protected folder will also be protected.
  7. Click "Go Back" on the next page that appears.
  8. Under "Create User" enter a username and password that can be used to access the protected folder.  Click "Add/Modify Authorized User".  You can add several different users if you want more than one person to have access to the folder.

REMOVING THE PASSWORD PROTECTION

If you wish to disable the password protection, follow steps 1-4 above, but uncheck the "Password protect this directory" box instead of checking it, then click "Save".

Reviewed 12/28/16

  • Email, SSL
  • 11 Users Found This Useful
Was this answer helpful?

Related Articles

How do I access the Raw Logs from cPanel?

cPanel comes with a number of log analyzing programs such as AWStats and Webalyzer, but suppose...

I deleted a file in FileManager, how can I restore it?

If you have deleted a file in the File Manager from inside your cPanel all is not lost.  Just be...

Can't access cpanel - How to open a port in Windows Live OneCare - delete

This article is marked for deletion as it is relevant only to add-on software for Windows Vista...

How often are statistics generated?

It looks like the stats generate at different times. What time do they usually run? All of the...

How do I execute a PHP file from CRON?

  In order to execute a PHP file from the CRON, you need to add a line to your PHP script. It...