Files & Databases

Password-protecting a directory

You can require a username and password before anyone can view a folder on your site - useful for a staging area, admin tools or private downloads. In the DirhamHost panel:

  1. Open Directory Privacy (or Password Protect Directories).
  2. Browse to the folder you want to protect and select it.
  3. Tick Password protect this directory and give it a display name.
  4. Add an authorised user with a username and strong password, then save.

Visitors to that folder will now see a browser login prompt. This is implemented with .htaccess and .htpasswd files, so it works for any content, not just one application.

Tips:

If you forget a password, simply add a new user or reset it in the same screen. Need to protect a whole staging site? We can help you set it up - WhatsApp +971 58 553 6767.

Still need a hand? Our UAE-based team is here 24/7.

Related articles

Using the file manager in DirhamHostUploading files to your websiteCreating an FTP accountFTP and SFTP settings and portsConnecting to your site with FileZilla