How to protect a folder with username and password

How to protect a folder with username and password

You can password lock a directory using cPanel's "Directory Privacy" option.
1. Log in to your cPanel account, see how to access cPanel at: https://help.scriptcase.net/portal/en/kb/articles/first-steps-with-the-hosting-access
2. In the "Files" section, click the "Directory Privacy" icon.



3. On the right side of the screen, click the "Settings" button.




When a small window prompts you, choose "Document Root for", select the domain where the
folder is located and click the "Save Changes" button.



4. Under "Security Settings" check the box next to "Password protect this directory" and enter a name for the protected directory, such as "Password protected area". Then click on the "Save" button.



5. Scroll down the page and under "Create User", fill in the username and password fields or use the Password Generator option to generate a new random password and click "Save".



Now if you try to open your password protected directory in your browser via the URL
which is already password protected, your browser will prompt you to enter the username and password.



    • Related Articles

    • How to change my cPanel account password?

      If you can access your cPanel account, follow these steps to reset your password: 1. Log into your cPanel account. 2. In the "Preferences" section, click on "Password & Security" Icon. 3. Enter your current password. 4. Enter your new password or use ...
    • How to reset the password of your email account

      Through the cpanel access "Email > Email Accounts". Choose the email you want to change your password, and click "Manage". Now you can fill in a new password, or click on "Generate" so that the system generates a new password. And click "Update Email ...
    • How to change the password of a email account

      If you want to change password of your email account then you can do this by the following steps: 1. Log into your cPanel account.  2. In the "Mail" section click on "Email Account" Icon.  3. Scroll down to the "Email Accounts" section and you should ...
    • How to create and change the Firebird password

      In this example, we will show you how to create and change the Firebird database password. First you must access your cPanel: See how to obtain credentials and access cPanel through our article: Here Within cPanel, you must click on the item ...
    • How to protect .htaccess file?

      For security reasons, we recommend that you prevent unauthorized access to your .htaccess file. To do this, you need to understand how to find this file. You can edit the .htaccess file using an FTP client or using cPanel. Add security code to ...