Many of you work for web agencies. You want to do the best for your customers, so you have test and/or staging environments. This helps ensure that you catch any potential problems before they go into production.

Generally, the bigger and more complex your site is, the more test and staging sites you’ll have.

We’ve been working to improve Watchful’s support for non-production sites. One example is .htaccess password protection. It’s common for you to use an .htaccess file and a .htpasswd file to block access to test and staging sites.

Your .htaccess file will look like this:

AuthType Basic
AuthName "restricted area"
AuthUserFile /public_html/protected-directory/.htpasswd
require valid-user

And your .htpasswd file will look like this code below. The username is watchful and the password is $apr1$zpv8entx$XKNUPdG5ARcVuDw2Z3b5h/. This week, we released a fix to the Watchful app that supports all your passwords, no matter how long or complex they are.

watchful:$apr1$zpv8entx$XKNUPdG5ARcVuDw2Z3b5h/

Once your password protection is in place, everyone will see a modal window like this when they access your site. It will be impossible to visit your site without knowing the username and password.

Htaccess

If you are protecting your test and staging sites, you can still manage those sites with Watchful.

  • Log in to Watchful and go to the “Dashboard”.
  • Click Edit next to your non-production site.
  • Scroll down and enter your username and password into the Htpasswd protection credentials area.
Watchful Htaccess

Once you’ve done that, you’ll be able to manage this site in exactly the same as a publicly visible site.

One final note: please make sure to use unique usernames and passwords for your .htaccess protection.

More on test and staging sites

Complete documentation is available for managing private sites. Also check out our recent blog post on monitoring development sites.

Join Watchful free for 30 days

If you haven’t tried Watchful yet, start a 30-day free trial. No commitment and no credit card required.

Leave a Reply

Your email address will not be published. Required fields are marked *