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
- Login to StackCP using this guide
- In the StackCP dashboard, navigate to the Security section and select Password Protection from the menu.
- In the Select Directory field, enter the directory you wish to protect. For example, to protect a folder named 'private', enter private.
- Enter the desired username in the Username field. This will be required to access the protected directory.
- Enter a secure password in the Password field.
- 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.