Keeping an eye on your staging sites

While there are many levels of sophistication when it comes to developing websites, most web developers are familiar with the use of production sites and staging sites.

Production sites are the public-facing versions of your website that are used every day by site visitors. Staging sites are private clones of your production sites. They are used primarily by developers to test changes before they are pushed to the production site and thus serve to find bugs, preview changes, and catch any problems.  

One of the critical features of a staging site is that it remain private so that (i) errors are not displayed to the public and (ii) search engines do not crawl the staging site thereby creating duplicate content issues that may affect placement in search results. 

Basic Authentication

If you're using a linux-based server like so many open source content management systems, privacy of your staging site is typically achieved by adding basic authentication via htpasswd. If you're using cPanel/WHM to manage your web hosting account, you may have seen this called Directory Privacy.

The only problem with using Directory Privacy to keep your staging site carefully out of view is that remote management tools like Watchful generally can't connect and manage the staging site in the typical fashion. 

Watchful connects to private sites by including the basic authentication credentials directly in the site URL. This is how a site URL might look including these credentials:

  • https://username:This email address is being protected from spambots. You need JavaScript enabled to view it.

Uptime Monitoring

Of course, you want to make sure that your staging sites are also online and ready to use by monitoring uptime. Historically, Watchful has not been able to monitor uptime for private sites. However, we've recently added this feature.

For each site, you can now enter the basic authentication credentials in the site details area as shown in this screenshot:

support htpasswd uptime

As shown, you need to explicitly allow us to retain these credentials. Please be sure that you use a unique username and password. 

How do I use this new feature?

Complete documentation is available for managing private sites. At this time, the connection and uptime monitoring are configured separately.

Roadmap for managing private/staging sites

Going forward, we plan to simplify managing and monitoring private sites. We hope to extend the use of the basic authentication fields so that this information can also be used to make connections to remote sites. Thus, the credentials will only need to be entered once.

We also plan to revamp and simplify the interface for site details. 

In short: