Monitor a website and its certificate
This guide sets up the monitors most websites need: up and fast, showing the real page, and a certificate that isn’t about to expire. It takes about 10 minutes.
You need: a runner group that can reach the site. For a public site, a hosted runner is enough; otherwise install a runner.
1. Is the site up?
Section titled “1. Is the site up?”- Monitors → New monitor → Templates → Website is up.
- Change the URL to your site.
- Choose the Runner group.
- Create monitor, then Run now.
It runs every 2 minutes and fails when the page doesn’t answer 200 within 5 seconds. It records the response time as the run’s value, and the TLS certificate.
The definition behind it:
{ "type": "http", "request": { "method": "GET", "url": "https://www.example.com/", "certificate": true }, "assert": { "status": [200], "maxDurationMs": 5000 }, "value": "durationMs" }2. Is it the right page?
Section titled “2. Is it the right page?”A maintenance page or a broken deploy can still answer 200. The Page shows the right content template also checks that the body contains a phrase only the real page has, such as your product name in the footer. Change the URL and the phrase (Body must contain).
For a JSON API, the assertion can look inside the answer:
status == 200 && json.status == "ok" && json.items|length > 03. Will the certificate expire?
Section titled “3. Will the certificate expire?”- New monitor → Templates → TLS certificate expiry.
- Change the URL. It runs once a day at 06:00.
It fails when the certificate is untrusted or has 14 days or fewer left:
{ "type": "http", "request": { "method": "HEAD", "url": "https://www.example.com/", "certificate": true }, "assert": { "status": [200, 301, 302], "expression": "certificate == null || (certificate.valid && certificate.daysLeft > 14)" } }With certificate: true, every run records the issuer, the expiry date and daysLeft. A daily check is enough; your frequent check then doesn’t need to repeat the TLS handshake.
4. Alert on slowness, not just failure
Section titled “4. Alert on slowness, not just failure”A single slow answer is noise. Add a rule on the Website is up monitor:
- Fire when: A value crosses a limit
- Value:
durationMs, Taking theavg, Looking at the last 10 minutes - Is
>800, Min runs 3, Resolve only past 500 - Severity medium
The rule form previews what it would have said about the past runs.
5. Put it on a status page
Section titled “5. Put it on a status page”Create a status page with an Uptime item for the site and a TLS certificate item for the certificate monitor. See Share a status page.
Other templates for sites
Section titled “Other templates for sites”The Websites & APIs templates also cover APIs, redirects and more. Pick one in Templates, or see the list in Check types.