PASSWORD PROTECTION

www.

How do I password protect a website folder?

Please note: This support article is a guide for our Linux users only.

The following article explains how to password protect a website folder. When password protection is enabled people will be required to enter a login and password to view the site. This can be done on an individual folder or to the entire website (the htdocs folder).

To password protect a website folder, please follow these steps:

  1. Open a browser window and go to www.HostMySite.com.
  2. Click on Control Panel Login.
  3. Log into the Control Panel as one of the following:
    • Account Administrator and select the appropriate domain
    • Technical Contact for the domain
  4. Click on Apache and select Password Protection.
  5. Select the folder you wish to protect. If you wish to setup password protection for the entire website, select the htdocs folder.
  6. Click Select Directory.
  7. Click Ok.
  8. Enter the necessary information:
    • Username: enter the username you wish to use.
    • Password: enter the password you wish to use.

  9. Click Add User.

Once this process is complete 2 files will be created in the folder you protected, a .htaccess file and a .htpasswd file. These files must remain in your directory for the password protection to function properly.

Comments are closed.

By using this website you consent to the use of cookies in accordance with our Privacy Notice. You may opt-out at any time in the Cookies section of the Privacy Notice page.