Healthchecks

DNS Health Checks

Monitor DNS resolution by checking A, AAAA, CNAME, MX, TXT, and NS record types.

Overview

DNS health checks monitor the DNS records for your domains to ensure they resolve correctly. DNS is the foundation of internet connectivity. If your DNS records are incorrect or your nameservers are down, users cannot reach your services regardless of whether the servers themselves are running.

Uptimy DNS checks query for specific record types and compare the results against your expected values. This catches issues like accidental record deletions, unauthorized changes, misconfigured migrations, and nameserver outages.

Supported Record Types

Record TypeDescriptionCommon Use
AMaps a domain to an IPv4 addressWebsite and service hosting
AAAAMaps a domain to an IPv6 addressIPv6-enabled services
CNAMECreates an alias pointing to another domainCDN and load balancer endpoints
MXSpecifies mail servers for the domainEmail delivery
TXTStores arbitrary text dataSPF, DKIM, domain verification
NSSpecifies authoritative nameserversDNS delegation

Configuration

ParameterDescriptionDefault
Domain nameThe domain to query DNS records forRequired
Record typeThe DNS record type to query (A, AAAA, CNAME, MX, TXT, NS)A
Expected valuesValues that must appear in the records, one per line. Part of a record is enough, so v=spf1 matches your SPF recordEmpty (any record passes)

Record type and Expected values are under Advanced settings in the app.

A CNAME check reads the domain's own CNAME record and compares your expected values with its target, the value your DNS provider shows. If the record points to a name that has its own CNAME, the check still compares with the first one. A domain with no CNAME record fails, even if it resolves to IP addresses.

Multiple Expected Values

You can specify multiple expected values for record types that commonly have several values, such as MX records or multiple A records for load balancing. The check succeeds when all expected values are found in the DNS response.

Response Data

Each DNS health check execution captures the following data:

FieldDescription
DomainThe domain that was queried
Record TypeThe DNS record type that was queried
Record CountTotal number of records returned by the DNS server
Resolved RecordsThe actual DNS records returned
Expected CountNumber of expected records configured
Found CountNumber of expected records that were found in the response
DNS ErrorsAny errors returned by the DNS server (NXDOMAIN, SERVFAIL, etc.)
Query TimeTime taken to complete the DNS query in milliseconds

Example Configurations

DNS is healthcheck type 7. These are its config as the API and uptimyctl take it. The interval and timeout aren't part of it: they are set on the check itself, as intervalSeconds and timeoutSeconds.

A Record Check

DNS Check - A Record
{
  "domain": "example.com",
  "recordType": "A",
  "expectedRecords": ["93.184.216.34"]
}

MX Record Check

DNS Check - MX Record
{
  "domain": "example.com",
  "recordType": "MX",
  "expectedRecords": ["mail1.example.com", "mail2.example.com"]
}

TXT Record Check

DNS Check - TXT Record
{
  "domain": "example.com",
  "recordType": "TXT",
  "expectedRecords": ["v=spf1"]
}

Common Use Cases

  • Migration Monitoring — Verify DNS records after migrating services to new infrastructure
  • CDN Verification — Ensure CNAME records point to the correct CDN endpoint
  • Email Deliverability — Monitor MX and TXT (SPF/DKIM) records to prevent email delivery issues
  • Nameserver Health — Check NS records to verify DNS delegation is intact
  • Unauthorized Changes — Detect unexpected DNS record modifications

DNS Caching

DNS records are cached by resolvers based on their TTL (Time to Live) value. After making DNS changes, it may take time for the new values to propagate. Keep this in mind when setting up checks after infrastructure changes.