Documentation

How to Password Protect a Directory

Anybody can access the content within the folder public_html (folder containing all public files of your hosting account) with a web browser. To limit or control access to particular directories within the public_html directory:

  1. Connect to cPanel
  2. Click on Web Protect in the Security section. You will find a list of sub-directories.
  3. Click on the icon to the left of public_html to see its content. This will show you the sub-directories of public_html.
  4. Click on the sub-directory name (not its icon) to modify its access requirements.
  5. In Security Settings, check the Password protect this directory box.
  6. Name the protected directory, such as 'My protected folder', for example.
  7. Click Save.
  8. At the bottom of the page, create a username and password to permit access to the protected folder.
  9. Click Add/modify authorized user
  10. You're all done! Check if the selected directory is correctly secured with the new settings by connecting to it with your web browser.

Note: You cannot password-protect individual files, only folders.

  • 1 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente ?