Uk2 Logo

Knowledgebase

Back to File Management

How To Password Protect A Directory


This guide explains how to password protect a directory on your UK2 web hosting account using the StackCP control panel. Password protecting a directory means that anyone trying to access that folder on your website will be prompted to enter a username and password before they can view its contents. This is useful for securing sensitive files or private sections of your website.


Step-by-step instructions

  1. Login to StackCP using this guide
  2. In the StackCP dashboard, navigate to the Security section and select Password Protection from the menu.



  3. In the Select Directory field, enter the directory you wish to protect. For example, to protect a folder named 'private', enter private.
  4. Enter the desired username in the Username field. This will be required to access the protected directory.
  5. Enter a secure password in the Password field.
  6. Click the 'Add Password Protection' button to apply protection to the selected directory.

Additional notes and troubleshooting tips

  • Once password protection is enabled, visiting the protected directory in a web browser will prompt you for the username and password you set.
  • To remove password protection, return to the Password Protection section in StackCP, locate the protected directory, and use the remove option provided.
  • Make sure to remember your username and password, as you will need them to access the protected content.
  • If you experience issues accessing your site after enabling protection, double-check that you have entered the correct directory path and credentials.


Related Articles

Complete Guide to File Manager
How do I use the File Permissions Checker?

Can’t Find what you need?

No worries, Our experts are here to help.