How do I password-protect a directory in cPanel?

Procédure

What is directory password protection?

This interface allows you to protect specific directories in your web space. Once this feature has been activated for a directory, the user will be required to enter a username and password in order to connect to it.

  • This feature configures the ".htaccess" and "htpasswd" files to restrict access to files on your website.
  • This feature does not protect access via FTP, SFTP or Web Disk.

The ".htaccess" file contains the address of your ".htpasswd" file. The ".htpasswd" file contains a list of all your identifiers and their passwords.

The"Directory confidentiality" tab will allow you to create the various accesses without having to configure the two files manually.

How do I password-protect a directory in cPanel?

1. Log in to your cPanel account at & click on the"Directory Confidentiality" icon.

How do I password-protect a directory in cPanel?

2. Click on the directory you wish to protect

For this help article, we choose to protect the directory named "demo".

How do I password-protect a directory in cPanel?

3. Tick the "Password protect directory" box

Enter the name you wish to give to this protected directory, then click on the "Save" button

How do I password-protect a directory in cPanel?

The directory is now protected and requires a password to access it from the web.

We now need to create at least one user and assign a password to allow access to the directory.

4. Click on the "Back" button

How do I password-protect a directory in cPanel?

5. Enter the user name authorised to access the protected directory.

Enter a secure password: minimum 8 characters with at least one symbol (you can use the password generator to obtain a password automatically).

Click on the "Save" button

How do I password-protect a directory in cPanel?

It will be taken into account immediately:

How do I password-protect a directory in cPanel?

cPanel tutorial video: How do I password-protect a directory in cPanel?

Need help using cPanel?

See all our cPanel training videos

How do I manage directory protection in cPanel?

To view your active users, remove a protection, change a password, etc., follow these steps:

1. Connect to your cPanel account & click on the"Directory privacy" icon

How do I password-protect a directory in cPanel?

2. Click on the protected directory you wish to manage

How do I password-protect a directory in cPanel?

3. Scroll down the page.

You can then view the users authorised to access the protected directory, delete them & change their password.

How do I password-protect a directory in cPanel?


Conclusion

You can now protect one or more directories on your cPanel web hosting using the"Directory Confidentiality" function. You can protect one or more different directories.

Don't hesitate to share your comments or questions!

Rate this article :

2/5 | 1 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

1mn reading

How do you change the style of your cPanel?

2mn reading

How do I create additional FTP accounts in cPanel?

3mn reading

How do I create custom error pages in cPanel?

1mn reading

How can I view access logs?


Ask the LWS team and its community a question