Protected Directories

  Password Protected Directories

There may be times that you want to prevent access to a web page or section of pages.  This can be done by password protecting the directory that contains the page(s).

You can let one or several users access a protected directory.  A typical use would be a web page that contains content for subscribers or information that you want only select people to access.  You would create a sub folder inside your public_html folder using your ftp program or the file manager and upload the page into that directory and then assign it a login and password so only the people you supply the login and password would have access to the web page(s) within that directory.


For example, you have a pdf document located at public_html/newsletters/july/special_report.pdf .   By password protecting the "newsletter" directory, it will require anyone going to the address  to enter a login and password before being granted access.


Select the Password Protect Directories icon from your cPanel main page. A list of the directories on your account will appear.

Navigate the directory list

The current directory is always displayed at the top of the list.

  • Click a folder icon to open a sub-directory and view its contents.
  • Click Up One Level to open the directory that contains the one you’re currently viewing.

cPanel - Password Protected Directories


Password protect a directory

  • Click the name of the directory you wish to password protect.


Please note that you have to create a directory before you enable the password protection for it. Also, using one and the same directory for the purpose of password protection and FTP storage in the same time is not recommended.


CAUTION:  Do not password protect your webroot (the www directory) or your website will not be displayed directly.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Script Installer

   Script Installer  The Softaculous script installer is integrated into your cPanel and allows...

File Manager

    cPanel File Manager  The cPanel File Manager is a browser based multi-function system that...


     Creating MYSQL Databases MySQL Databases are used by script applications such as Forums,...

Web Statistics

  Webalizer Statistics   1. Click on the Webalizer Icon in your cPanel 2.  Click on the VIEW...

Webmail System

     Webmail System.                         Webmail.Yourdomain  Once you've created your email...