Password Protecting Directories in cPanel

Password protection for directories allows you to restrict access to specific areas of your website, requiring users to enter a username and password before accessing the content. This feature is useful for safeguarding sensitive information or private areas of your website.

 

 

Step 1: Login to cPanel 

Step 2: Locate the Directory Privacy Option

  1. In the cPanel dashboard, scroll down to the Files section.
  2. Click on Directory Privacy (this may also be labeled as Password Protect Directories).

 

Step 3: Select the Directory to Protect

  1. You will see a list of directories on your server.
  2. Navigate through the folder structure to find the directory you want to protect.
  3. Click on the directory name.

Step 4: Enable Password Protection

  1. Once you select the directory, you will see Edit label click on it
  2. then you will see an option labeled "Password protect this directory."
  3. Check the box next to this option.
  4. Enter a name for the protected directory in the "Protected Directory" field. This is typically a brief description to inform users of the protection (e.g., "Private Area").

 

Step 5: Create a Username and Password

  1. Scroll down to the "Add a New User" section.
  2. In the Username field, enter a username that users will use to access the directory.
  3. In the Password field, enter a strong password. It’s recommended to use a combination of letters, numbers, and special characters.
  4. Confirm the password by re-entering it in the "Password (again)" field.
  5. Click the Add or Modify Authorized User button to save the new user credentials.

Step 6: Review and Save Settings

  1. After adding the user, you will see a confirmation message indicating the user has been added.
  2. You can add more users by repeating Step 5 if needed.
  3. Once you are finished, you can go back to the main Directory Privacy page to review the protected directory settings.

Step 7: Test Password Protection

  1. Open a new browser tab or window.
  2. Navigate to the protected directory (e.g., https://yourdomain.com/protected-directory).
  3. You should be prompted to enter the username and password. Enter the credentials you created in Step 5.
  4. If successful, you will gain access to the directory. If not, ensure you are entering the correct credentials.
Je li Vam ovaj odgovor pomogao? 0 Korisnici koji smatraju članak korisnim (0 Glasovi)