Protect a website folder in cPanel Print

  • 0

Require a username and password for a folder that should not be publicly browsable.

Before you start

Identify the right document root and keep a copy of any existing directory configuration. Use this only where the hosting service supports it.

What to do

  1. In cPanel, open Directory Privacy and select the intended directory.
  2. Enable password protection and create a dedicated user for access.
  3. Check whether the rule applies to the entire folder and its subfolders before sharing the link.

Check that it worked

In a private window, verify you are challenged on the protected URL and can sign in with the intended account.

If it does not work

Disabling a directory listing alone does not prevent direct access to known files. If you need stronger isolation or access fails unexpectedly, contact support and avoid storing private data under the public web root.

Related guides


Was this answer helpful?

« Back

Powered by WHMCompleteSolution