Websites & Hosting

Website Uptime Monitoring

Learn what to check, how often and from where, and how to set alerts that reach the right person quickly without crying wolf every night.

Key takeaways

  • Monitor from outside your own network and server, so the check sees what visitors see.
  • Check that the right content comes back, because a server can answer successfully with a broken page.
  • Require a few consecutive failures or confirmation from several locations before alerting.
  • Watch the things that fail on a schedule, including certificates, domain renewal and background jobs.
  • Write down who receives each alert and the first steps to take, then test that alerts actually arrive.

Uptime monitoring means having a system outside your website request it at regular intervals and alert you when the answer is wrong, slow or missing. Without it, you usually learn about an outage from a customer, or you don't learn about it at all.

Setting up a basic monitor takes a few minutes with a hosted service or an open-source tool. Making it useful takes a few more decisions: what counts as "up," how many failures justify waking someone, and what that person does next.

What "up" means

A server that answers a ping may still serve an error page. A home page served from cache may look fine while the database is down and nobody can order. Define up in terms of what visitors need.

An HTTP check requests a URL and evaluates the response. A good one verifies several things:

  • The status code is the expected one, usually 200.
  • The page contains a specific phrase that appears only when it rendered properly.
  • The response arrives within a time limit.
  • The TLS certificate is valid for the hostname.

The HTTP status reference explains what the codes mean. As a rough guide, codes in the 500 range point to a server-side problem, while an unexpected 403 may mean a firewall is blocking the monitor itself.

Types of checks

Check What it tells you What it misses
Ping (ICMP) A host is reachable Whether the website works; many hosts block it
TCP port Something accepts connections Whether it responds correctly
HTTP with content match The page works from outside Multi-step journeys
DNS Records resolve to expected values Server health
Certificate expiry Renewal is overdue Other TLS misconfiguration, unless also checked
Scripted transaction Sign-in or checkout works Costs more to build and maintain
Heartbeat A scheduled job reported in Whether its output was correct

A heartbeat check works in reverse. Your backup script or cron job calls the monitor when it finishes, and the monitor alerts if the call doesn't arrive on time. It is the best way to catch tasks that silently stop.

Hosted service or self-run tool

A hosted monitoring service gives you probes in several places, alerting and history with almost no setup. Free tiers usually limit the number of checks, the interval or the alert channels, so read what is included before relying on it.

Open-source monitoring tools run on a machine you control. They cost no subscription and keep data in your hands, but you now maintain them, and they must live somewhere independent. A monitor on the same server as the website goes down with it. One in your home or office can raise false alarms whenever your own connection drops.

Many sites do well combining the two: a hosted service for outside checks and alerts, plus the host's own graphs for processor, memory and disk. Whatever you pick, check that it can match page content, test from several regions, watch certificates, accept heartbeats and send alerts through a channel you actually notice. Protect the monitoring account with multi-factor authentication, and avoid giving test accounts used in scripted checks any more permission than the test needs.

Choose what to monitor

Start with a handful and add as you learn:

  1. The home page, with a content match.
  2. A page that depends on the database, such as a product or search results page.
  3. Sign-in or checkout, preferably as a scripted test using a dedicated test account.
  4. Your API, if other software depends on it.
  5. Certificate expiry and domain expiration.
  6. Mail delivery records and backup heartbeats.

A dedicated health endpoint, for instance /health, can check the database and other dependencies and return a failing status when one is down. Keep it cheap, and don't let it reveal versions, hostnames or error details to the public.

How often and from where

Shorter intervals find outages sooner and measure them more precisely. A five-minute interval can miss a brief failure entirely; one minute is a common choice for important pages. Scripted transactions are heavier and usually run less often.

Check from more than one location. A single probe may have its own network trouble, and your site may fail only in one region, for example because of a routing problem or a content delivery network edge. Requiring two or more locations to agree filters out most false alarms.

How a monitor decides to alert
Monitor probes Your website On-call person Request the page 1 503 error 2 First failure: retry Retry from other locations 3 Still failing 4 Confirmed Send alert with details 5 200 OK again 6 Later Send recovery notice 7 Monitor probes Your website On-call person Request the page 1 503 error 2 First failure: retry Retry from other locations 3 Still failing 4 Confirmed Send alert with details 5 200 OK again 6 Later Send recovery notice 7

Make sure your own firewall, bot protection and rate limits allow the monitor. Many services publish the addresses or identifiers they use. Filter these requests out of your visitor analytics.

Design alerts people won't ignore

An alert should mean "someone needs to act." If your phone buzzes for every momentary blip, you will start ignoring it, including on the night it matters.

  • Alert after consecutive failures or multi-location confirmation.
  • Send urgent failures by text, call or push notification; send warnings such as a certificate expiring in weeks by email or a ticket.
  • Include the URL, the error, the time and a link to your response notes.
  • Escalate to a second person if the first doesn't acknowledge.
  • Send a recovery message so people stop investigating.

Don't route alerts only through the thing being monitored. If your email runs on the same server as your website, an outage can swallow its own warning.

What to do when an alert fires

Write the steps before you need them.

First checks when the site is reported down
Does it fail from other networks and an outside checker? YES Continue below; otherwise suspect your own connection 1 NO Does the domain fail to resolve? YES Check DNS records and domain status 2 NO Is there a certificate warning? YES Check expiry and certificate renewal 3 NO Is your host or CDN reporting an incident? YES Follow their status page and tell your users 4 NO Did you change something recently? YES Roll it back and retest 5 NO Inspect the server Read error logs; check disk, memory and services Does it fail from other networks and an outside checker? 1 IF YES Continue below; otherwise suspect your own connection NO Does the domain fail to resolve? 2 IF YES Check DNS records and domain status NO Is there a certificate warning? 3 IF YES Check expiry and certificate renewal NO Is your host or CDN reporting an incident? 4 IF YES Follow their status page and tell your users NO Did you change something recently? 5 IF YES Roll it back and retest NO Inspect the server Read error logs; check disk, memory and services

From a terminal, curl shows the status line and headers quickly:

curl -sS -o /dev/null -w "%{http_code} %{time_total}s\n" https://www.example.com/

On Windows PowerShell, call curl.exe explicitly, since curl may be an alias for another command, and use NUL in place of /dev/null. For deeper investigation, server logs usually show what failed and when.

Understand the percentages

Monitors report availability as a percentage. The allowed downtime is easy to underestimate in both directions: 99 percent permits more than three and a half days a year, while 99.9 percent permits under nine hours a year. What 99.9 percent allows works through the figures and what hosting guarantees usually exclude.

Measured uptime depends on interval, locations and what you check, so two tools can disagree. Compare your own figures over time more than against anyone's marketing.

Response time deserves a graph too. A slow upward drift often warns of a growing database, a full disk or increasing traffic before anything fails outright. Broader approaches that combine measurements are described in logs, metrics and traces.

Monitoring and real users

Outside checks are synthetic: a script requests chosen pages on a schedule. They work at three in the morning when nobody is visiting, and they give consistent measurements. They also see only what you told them to look at.

Real user monitoring collects timing and error information from visitors' own browsers through a small script. It can reveal that one browser version hits a script error, or that visitors on slow mobile connections wait far longer than your probes suggest. It also involves collecting data about people, so consider what you gather and what your privacy notice and local rules require.

For a small site, synthetic checks plus a glance at error logs and analytics cover most needs. Add real user measurement when you have enough traffic for patterns to mean something and someone who will act on them.

Partial failures are worth planning for. A payment provider, a login service or a map script can fail while your own server is perfectly healthy. Monitor the journeys that depend on them, and decide what visitors see meanwhile, such as a clear message and another way to order.

Tell your visitors

For services people rely on, a status page hosted separately from your site gives you somewhere to post updates during an outage. Say what is affected, what you know, and when you will post again. Short and honest beats detailed and speculative.

For planned maintenance, announce it ahead, pause alerts for that window and return a 503 status with a Retry-After header, so well-behaved clients understand the outage is temporary.

Keep the monitor honest

Test alerts when you set them up and after contact changes, by pointing a temporary monitor at a page that doesn't exist. Review monitors a few times a year: remove checks for retired pages, add them for new features and update the on-call list.

After any real outage, ask whether monitoring noticed it first. If a customer beat your tools, add the check that would have caught it.

When monitoring is more than you need

A hobby page that nobody depends on can get by with a single free check and an email alert. There is little point in one-minute scripted tests and a rotation of on-call volunteers for a site that updates twice a year. Match the effort to the cost of an outage, and add checks when that cost grows, for instance when you start taking orders or bookings.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Websites & Hosting →

Latest news on this topic