How to Set Up Website Monitoring That Actually Works: A Developer's Guide

Published: (January 3, 2026 at 05:22 PM EST)
4 min read
Source: Dev.to

Source: Dev.to

Your website is down.

You don’t know it yet, but your users do. They’re leaving. Some are tweeting about it.

Your SSL certificate expired three days ago, and Chrome is showing that scary “Not Secure” warning to everyone.

Your domain expired and you forgot to renew it?

These scenarios play out thousands of times daily. The frustrating part? It’s entirely preventable.


Why Most Monitoring Setups Fail

Problem 1: Single‑Location Monitoring

Your server is in Virginia. Your monitoring pings from Virginia. Everything looks fine.

Meanwhile, users in Europe are experiencing 5‑second load times due to a CDN issue, and your MENA‑region users can’t connect at all because of a routing problem.

Solution: Monitor from multiple geographic locations.

Problem 2: Only Checking HTTP 200

# This is what most basic monitoring does
curl -s -o /dev/null -w "%{http_code}" https://yoursite.com
# Returns: 200
# You think: "Great, site is up!"

A 200 status doesn’t mean your site works. Your API could be returning errors, or your database connection could be failing.

Problem 3: Forgetting SSL Certificates

SSL certificates expire. When they do, browsers block access to your site entirely.

Problem 4: Domain Expiration

This is embarrassing, but it happens more often than you think. Your domain expires because:

  • The credit card on file expired
  • Renewal emails went to spam
  • The person who registered it left the company

When your domain expires, your entire online presence vanishes. Worse, domain snippers can grab it within hours.

Building a Proper Monitoring Strategy

Layer 1: Endpoint Health Checks

Create a dedicated health endpoint:

// Express.js health endpoint example
app.get('/api/health', async (req, res) => {
  const health = {
    status: 'healthy',
    timestamp: new Date().toISOString(),
    checks: {}
  };

  // Check database
  try {
    await db.query('SELECT 1');
    health.checks.database = 'ok';
  } catch (e) {
    health.checks.database = 'failing';
    health.status = 'unhealthy';
  }

  // Check Redis
  try {
    await redis.ping();
    health.checks.cache = 'ok';
  } catch (e) {
    health.checks.cache = 'failing';
    health.status = 'unhealthy';
  }

  const statusCode = health.status === 'healthy' ? 200 : 503;
  res.status(statusCode).json(health);
});

Layer 2: SSL Certificate Monitoring

Set up alerts at multiple thresholds:

Days Before ExpiryAlert Level
30 daysReminder
14 daysWarning
7 daysCritical
1 dayEmergency

Layer 3: Domain Expiry Monitoring

Your domain is the foundation of everything. Monitor it separately from SSL:

  • Track expiry dates for all your domains
  • Set up alerts 60 / 30 / 14 / 7 days before expiration
  • Include secondary domains you own
  • Don’t rely on registrar emails—they often get filtered as spam

Layer 4: Multi‑Region Checks

Monitor from at least three geographic regions:

  • Americas – US East / West
  • Europe – Frankfurt / London
  • Asia‑Pacific / MENA – Singapore, Dubai, Riyadh

Setting This Up with Uptime Chef

I’ve been using Uptime Chef because it monitors from worldwide locations—including MENA (Riyadh, Cairo, Dubai)—which most services don’t offer.

Step 1: Add Your Monitors

After signing up:

  • Homepage monitor – Basic availability
  • Health endpoint monitor – Your /api/health
  • SSL monitor – Certificate expiration
  • Domain monitor – Domain expiry tracking

Step 2: Configure Webhook Alerts

Slack Integration

{
  "webhook_url": "https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
  "payload_template": {
    "text": "🚨 Alert: {{monitor_name}} is {{status}}",
    "blocks": [
      {
        "type": "section",
        "text": {
          "type": "mrkdwn",
          "text": "*{{monitor_name}}*\nStatus: {{status}}\nResponse Time: {{response_time}}ms"
        }
      }
    ]
  }
}

Discord Integration

{
  "webhook_url": "https://discord.com/api/webhooks/YOUR/WEBHOOK",
  "payload_template": {
    "embeds": [
      {
        "title": "{{monitor_name}} is {{status}}",
        "color": 15158332,
        "fields": [
          { "name": "Response Time", "value": "{{response_time}}ms" }
        ]
      }
    ]
  }
}

Step 3: Create a Status Page

For SaaS products, a public status page (e.g., status.yourcompany.com) builds trust and reduces support tickets.

Step 4: API Integration

// Fetch monitor status via API
const response = await fetch('https://dashboard.uptimechef.com/v1/monitors', {
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});

const monitors = await response.json();
monitors.forEach(monitor => {
  console.log(`${monitor.name}: ${monitor.status}`);
});

Monitoring Checklist

  • Homepage and critical pages monitored
  • API health endpoints monitored
  • SSL certificates monitored (30 / 14 / 7‑day alerts)
  • Domain expiry monitored (60 / 30 / 14 / 7‑day alerts)
  • Monitoring from 2‑3 geographic regions
  • Alerts configured (email + Slack/Discord)
  • Status page set up

The Cost of Not Monitoring

ScenarioCost
Average e‑commerce revenue$10,000/day
1 hour undetected downtime≈ $417 lost
6 hours overnight downtime≈ $2,500 lost

Compare that to Uptime Chef’s free tier or paid plans starting at $0.99 / month.

Conclusion

Good monitoring isn’t about more alerts—it’s about the right alerts, from multiple locations, for the right endpoints.

Start with the basics:

  • Monitor your health endpoint
  • Add multi‑region checks
  • Track SSL and domain expirations
  • Hook alerts into Slack/Discord
  • Publish a status page

Implement a robust strategy now, and you’ll stop watching users leave in silence.

int, not just your homepage

  • Track SSL certificate expiration
  • Track domain expiry dates
  • Monitor from multiple regions if you have international users
  • Set up webhooks to integrate with your existing tools

Try it out: Uptime Chef has a free tier for side projects.

What’s your monitoring setup? Share your war stories in the comments!

Back to Blog

Related posts

Read more »

The RGB LED Sidequest 💡

markdown !Jennifer Davishttps://media2.dev.to/dynamic/image/width=50,height=50,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%...

Mendex: Why I Build

Introduction Hello everyone. Today I want to share who I am, what I'm building, and why. Early Career and Burnout I started my career as a developer 17 years a...