To create protection for a directory of your hosting with a Username and Password, follow the steps:

1. In your cPanel, select "Directory Privacy" in the Files section. Then select the directory you want to assign privacy to.

2. Complete the fields as desired. Remember to check the option "Password protect this directory".

   \
   ![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc3RQIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--76f35efe8d221d170958bf8b23fbda308c5c5b0f/image%20(50).png)

   After the creation of the first user, the list of created users will be available in this directory, where you can monitor all created users.

   \
   ![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc3hQIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ae61235c9ae5c003233d73c9e3bc9e1657f37e41/image%20(51).png)

   When accessing the Directory Privacy option again, there will be a padlock symbol next to the folder you have set up protection.

   \
   ![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBczFQIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a6fe4c9bfdc36e3836b88788cd77c1dc47e0f0de/image%20(52).png)

   You can also change the Directory Privacy settings under “Settings” in the upper right corner.

3. There you can change the base directory to a subdomain, for example, and customize it so that this new option is always opened in the next accesses to the Directory Privacy.

   \
   ![](http://34.207.224.239:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBczVQIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e7606c46f2b808480c91ff026acfdbf21b21cbf6/image%20(54).png)


