Main Support

Monitoring private sites that require basic authentication credentials

Some people want to protect their web sites by restricting access with a username and password. This is a common practice for staging sites for example.

On linux-based servers (very common for WordPress and Joomla users), this is often achieved using basic authentication.  An .htaccess file is used to indicate what user(s) can access the site and its contents while the username/password combinations are stored in the .htpasswd file. On sites using cPanel/WHM, this is sometimes referred to as Directory Privacy.

Once the .htaccess / .htpasswd combination has been configured, all http and https requests (i.e. loading the folder in a web browser) will require credentials to proceed.

Watchful can remotely manage private website. Please configure the site connection and uptime monitoring as shown below.

Configuring the website connection

To allow Watchful to connect to and manage your website, you'll need to add the access credentials directly in the site URL.

  1. In the Watchful dashboard, find the website of interest and click the site name to open the site drawer.
  2. In the site drawer, click on the Edit button.
  3. In the Edit Site dialog, look for the Site url field. Provide your credentials in this format:
    1. https://your-htuser:This email address is being protected from spambots. You need JavaScript enabled to view it.
  4. Save the settings. 

support htpasswd url

Configuring Uptime Monitoring

Using basic htpasswd authentication to make a website completely private will interrupt the normal ability of Watchful to monitor uptime. To allow this for private websites, the Edit Site dialog contains specific fields to store your credentials. These credentials will be used to monitor uptime.

Note: Credentials for basic authentication are not encrypted by Watchful. As such, be sure to use unique credentials for basic authentication. Neither the username nor the password should bear any resemblance to any other password you use.

To configure Watchful's uptime monitoring for private sites, follow these instructions:

  1. In the Watchful dashboard, find the website of interest and click the site name to open the site drawer.
  2. In the site drawer, click on the Edit button.
  3. In the Edit Site dialog, look for the Username and Password fields. Enter the basic authentication credentials 
  4. Click the checkbox to explicitly give permission for Watchful to store your credentials.
  5. Save the settings. 

support htpasswd uptime