Using cPanel Directory Privacy

There may be occasions when you want to limit access to either the whole or part of your web site/hosting.

For example, if you are setting up a new static site and want to restrict access until the site is ready to go live.

Most modern Content Management Systems (CMS) will have the function either built-in or available via a plug-in/extension to put the site into Maintenance or Coming Soon mode - and they may be easier to manage than cPanel Directory Privacy.
  1. Click the Directory Privacy icon within the Files section of cPanel
  2. Note the instruction - Click the icon to open a folder. Click the name to select a folder.
    Navigate to the folder you'd like to protect by clicking the folder icons and click the folder name to select it.
    In this example we are going to protect the whole site - so we will click on public_html
  3. In the following screenshot, we need to both turn on Directory Privacy and then once that's done create a user with access.
    To enable Directory Privacy for the selected folder tick the checkbox - Password. This protects this directory.
    Then enter a name - this will be displayed when anyone tries to access this folder, along with the login prompt.
    Then click the Save button.
  4. You'll see a confirmation screen - click Go Back to continue adding an authorised user.
  5. In the Create User section, enter the required details - a Username and the password twice. You can use the Password Generator to create a random password that meets the systems minimum security policy. Please ensure you note down this username and password - they will be needed to access this directory externally once set.
    Click Save once you've noted the username and password.
  6. Click Go Back on the confirmation screen and you'll be returned to the main Directory Privacy screen.
    To disable Directory Privacy
    To disable Directory Privacy, simply untick the Password protect this directory. box and click Save below it.
    To delete an Authorised User
    Select the username in the Authorised Users list and click Delete User below.

How did we do?

Powered by HelpDocs (opens in a new tab)
© Krystal Hosting Ltd 2002–