> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://krystal-dev.crisp.help/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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
    
    ![](https://storage.crisp.chat/users/helpdesk/website/26afbbe15f9a6400/783d6261-250c-4618-87c4-51dbe1_174mojy.png)
    
2.  Note the instruction - **Click the icon** to **open** a folder. **Click the name** to **select** a folder.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/35df710154c2d400/efa697f7-1e4c-4d48-87df-d2dbca_1t6z5ay.png)
    
    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.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/f94ad339ab382800/10137a8d-f357-4403-af90-5abeb8_144zr3p.png)
    
    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.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/393ae281e88cbc00/77c61782-a17d-4311-b948-5beaeb_4ncynx.png)
    
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.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/1578e1548ba60100/50754142-b2ef-496b-b63c-11e8e5_apamon.jpeg)
    
6.  Click **Go Back** on the confirmation screen and you'll be returned to the main Directory Privacy screen.
    
    ![](https://storage.crisp.chat/users/helpdesk/website/33228665f964a600/6621d74d-fee0-48ce-8829-b29c17_ezsko.jpeg)
    
    **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.

* * *

* * *