Password Protecting Directories

Password Protecting Directories

  1. In cPanel, under "Files", select the "Directory Privacy" icon.
  2. Select "Web Root". You might need to checkmark "Show Hidden Files"
  3. Click the directory that you wish to password protect.
  4. Check the "Password Protect This Directory" box.
  5. Enter the name of the directory you wish to display to visitors trying to log in.
  6. Select "Save".
  7. Select "Go Back"
  8. Enter the username and password (the password cannot exceed 8 characters) and click "Save."



Verify that the directory is protected by navigating these with your browser.



Common Errors

404 Error

This can be caused by using a URL that includes the use of a shared server SSL. You are receiving a 404 because Apache is unable to find the 401 it is looking for. You will need to add this line to your .htaccess file: "ErrorDocument 401 "Authorization Required".

500 Error After Logging In

Verify the ownership of the .htapasswds folder. They must be changed from "user.user" to "user.nobody". The permissions must be set to 750.
  • 23 Users Found This Useful
Was this answer helpful?

Related Articles

Do you offer password protected directories?

By default, cPanel allows you to password protect directories in your account that you wish to...

Why can't I log into my cpanel or webmail?

There various issues that you may not be able to login to your cPanel or WebMail. We have...

Custom Error Pages

Creating your own error pages can be accomplished through cPanel. After logging in, under...

Requesting a New cPanel Password

Resetting Your cPanel PasswordYou can reset your cPanel password from the cPanel login screen....

Secure cPanel Login

Using Shared SSL to Access cPanel Use https, enter your site's IP address, and the secure port...