HostGator.com » Support Portal

Can I password protect directories?

To password protect directory:

Wait! Why read this when you can watch the movie tutorial here.

  1. Login into your cPanel and click on the Password Protect Directories icon, found under Security.
  2. Choose Web Root (and you may need to select Show Hidden Files)
  3. Click on the name of the directory that you wish to password protect.
  4. Check the box for "Password protect this directory:"
  5. Fill in "Name the protected directory". Actually, this is just the message that will show to visitors when they try to login, and can be anything you like.
  6. Click on Save button below.
  7. Click "Go Back"
  8. Fill in a Username and Password at the bottom of the page, and click "Add/modify authorized user".
  9. You are Done. The directory you selected is now protected by password.
To ensure you directory has been password protected, launch you browser and visit the folder. If the browser prompts you to login, then your directory has been password protected.

Note: At this time you can only protect directories (not individual files) from cPanel. Any file that needs protection should be placed in a protected directory.

Article Comments

Bonnie
I password protected a directory containing a few wordpress installs, but when I navigate within a WordPress file, I am prompted again to enter my password.

If I enter the password again, it works, and if I cancel, the site still works. So no problems, except that it's kind of tedious to have that password request constantly popping up.

How can I just have it pop up once, when we first access the directory?

HostGator
Sounds like you have password protected more than one directory. Likely, you additionally protected a subdirectory (e.g. wp-admin).

Please contact us via phone or live chat for help.


If you have read our knowledge base and still have questions or need more information, please contact us via phone or live chat for immediate assistance.

Post Comment