Blog
Which DNS failures actually take sites down, which records to watch (A, AAAA, CNAME, MX, NS), how often to check them and how to alert on them.
DNS monitoring means querying your domain's records from outside your infrastructure on a schedule and alerting when answers disappear, change unexpectedly or stop matching across nameservers. Most sites that go down because of DNS do so for unexotic reasons: an expired domain, a broken delegation, records lost or left stale during a migration, or an outage at the DNS provider. Check A/AAAA, CNAME, MX and NS against expected values every one to five minutes for critical hostnames, check delegation and domain expiry less often, and page only when several regions agree.
An HTTP check against https://www.example.com will notice that something is wrong when DNS breaks. It will not tell you that DNS is the cause, and it often notices late. Resolvers cache answers for the record's TTL, so a deleted or changed record can keep working for minutes or hours from your probe's point of view while new visitors already fail.
DNS failures are also frequently partial. One of four nameservers serves an old zone. The IPv4 record is correct but the IPv6 record points to a decommissioned server. Mail breaks while the website stays up. A dedicated check asks the specific question and compares the answer to what you expect.
When a domain expires, the registry eventually removes or replaces its delegation. Website, API, email and every subdomain stop resolving at once. Auto-renewal fails silently more often than people expect: an expired card, a billing contact who left the company, a registrar account nobody can log into. Domain expiry is not a record you can query with dig, so it needs a separate check.
Delegation is the NS set the parent zone (for example .com) hands out for your domain. It breaks when the NS records at the registrar point to nameservers that no longer host your zone, when a nameserver hostname stops resolving, or when one of several nameservers answers with stale data. A DNSSEC variant of the same problem: after switching DNS providers, the DS record at the registrar still matches the old provider's keys, and validating resolvers return SERVFAIL for everyone who uses them.
Migrations to a new DNS provider, CDN, load balancer or hosting platform are the most common source of self-inflicted DNS outages. Typical mistakes:
If all of your nameservers sit with one provider and that provider has a problem, cached answers keep some users working until their TTL runs out, then resolution fails. From the outside this looks like a slow, spreading outage rather than a clean cut. Checking the authoritative servers directly shows it immediately, without waiting for caches to expire.
A record deleted in the provider's dashboard, a Terraform apply against the wrong workspace, a CNAME edited to point at a staging host. These are fast to fix once detected and hard to detect from an HTTP check while caches still hold the old answer.
Useful DNS monitoring compares answers against expected values, queried both from public resolvers and directly from your authoritative nameservers; a check that only asks whether a name resolves misses most real failures.
www and for every hostname your product depends on (API, app, auth). Expected value: the set of IPs you actually serve from. Alert on no answer, NXDOMAIN, SERVFAIL or an IP outside the expected set.You can do all of this by hand with dig, which is also the fastest way to verify an alert:
# Delegation as the parent zone sees it (.com/.net example)
dig +short NS example.com @a.gtld-servers.net
# Find the parent servers for other TLDs
dig +short NS org.
# Answers straight from your authoritative servers, bypassing caches
dig +short A example.com @ns1.your-dns-provider.net
dig +short AAAA example.com @ns1.your-dns-provider.net
# What a public resolver returns (cached view)
dig +short CNAME www.example.com @1.1.1.1
dig +short MX example.com @8.8.8.8
# SOA serial from every nameserver, should all match
dig +nssearch example.com
# DNSSEC: a validating resolver returns SERVFAIL on a broken chain
dig A example.com @1.1.1.1 | grep statusThe difference between the authoritative answer and the resolver answer is the point. Authoritative queries show the truth right now. Resolver queries show what users get, including stale caches and DNSSEC validation failures.
Match the interval to how fast each failure hurts and how fast it can change:
Before a planned migration, lower the TTL of the affected records to something like 300 seconds at least one full old-TTL period in advance. That keeps a wrong answer from being cached for hours and makes your monitoring results reflect reality faster.
www, API, app, auth, status, mail. Include hostnames used by mobile apps and webhooks, which people tend to forget.For domain expiry, a small daily script that pings a heartbeat URL only while the domain is healthy works well, because a missing ping alerts you both when the domain is close to expiring and when the script itself stops running. The pattern is the same one described in heartbeat monitoring for cron jobs:
#!/bin/sh
# Runs daily via cron. Pings the heartbeat only if expiry is > 30 days away.
DOMAIN=example.com
EXPIRY=$(whois "$DOMAIN" | grep -iE 'Registry Expiry Date|Expiration Date' | head -1 | awk '{print $NF}')
EXP_TS=$(date -d "$EXPIRY" +%s) || exit 1
DAYS=$(( (EXP_TS - $(date +%s)) / 86400 ))
if [ "$DAYS" -gt 30 ]; then
curl -fsS -m 10 "$HEARTBEAT_URL" > /dev/null
fiWHOIS output differs between registries, so test the grep pattern for each TLD you own, or query RDAP instead, which returns structured JSON.
DNS alerts are a mix of urgent and slow-burning problems, so they should not all go to the same place.
Requiring agreement from several regions matters more for DNS than for most checks, because a single resolver or network path can return an odd answer for its own reasons. The broader techniques for this are covered in how to reduce false positive alerts.
Write the first verification step into the alert text: the exact dig command against the authoritative server and against a public resolver. Whoever is on call at 3 a.m. should not have to remember which nameservers you use.
If you prefer not to maintain this yourself, m0nitor offers a DNS monitor type alongside HTTP(S), TCP, ping, SSL certificate expiry and heartbeat monitors. Checks run from distributed probes in several regions, and an outage is confirmed by multiple locations before an alert fires. With alert workflows you can route DNS events differently from other monitors, for example notifying a chat channel, creating an incident or calling a webhook. The domain expiry script above pairs with a heartbeat monitor. Any other uptime tool or a set of scheduled dig scripts can cover the same ground.
DNS monitoring is the scheduled querying of your domain's DNS records from outside your network, comparing the answers against expected values and alerting when records go missing, change unexpectedly, return errors or differ between nameservers.
Check A, AAAA and CNAME records of critical hostnames every 1 to 5 minutes, NS, SOA, MX and TXT every 5 to 15 minutes, and domain registration expiry once a day with warnings starting 30 days before expiry.
No. An HTTP check detects that users cannot reach the site but not that DNS is the cause, and cached DNS answers can hide a broken record from the probe for the length of the TTL. Partial failures like a wrong AAAA record or broken MX records may not affect the HTTP check at all.
Query WHOIS or RDAP for the expiry date once a day and alert when it falls below 30 days. A simple approach is a cron script that pings a heartbeat URL only while the domain is safely valid, so both an approaching expiry and a broken script trigger an alert.