Knowledgebase

How to Password Protect a Directory  Print this Article

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.

Was this answer helpful?

Related Articles

How to Transfer Files onto the Server (FTP, Manager)
To publish your website, it is necessary to transfer files to the server. Two important pieces of...
How to Create and Manage Email Accounts
Each hosting account allows you to create one or more personalized email accounts. The allowed...
How to View Statistics on your Website's Visitors
Obambu includes two visitors-statistics applications, Webalizer and Awstats. These applications...
How to Create a Backup
Here are the steps to create a backup of your website: Connect to cPanel Under Files, select...
Utilisation de .htacces
Introduction Le fichier .htaccess est un fichier de configuration qui peut être...