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 via a plug-in/extension to put the site into maintenance mode - and they may be easier to manage than cPanel Directory Privacy.
- Click the Directory Privacy icon within the Files section of cPanel
- 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 be 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
- In the following screen we need to both turn on Directory Privacy and the once that's done create a user with access.To enable Directory Privacy for the selected folder tick the check box - Password protect 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.
- You'll see a confirmation screen - click Go Back to continue adding an authorised user.
- 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.
- 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.