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 Type | Description | Common Use |
|---|---|---|
A | Maps a domain to an IPv4 address | Website and service hosting |
AAAA | Maps a domain to an IPv6 address | IPv6-enabled services |
CNAME | Creates an alias pointing to another domain | CDN and load balancer endpoints |
MX | Specifies mail servers for the domain | Email delivery |
TXT | Stores arbitrary text data | SPF, DKIM, domain verification |
NS | Specifies authoritative nameservers | DNS delegation |
Configuration
| Parameter | Description | Default |
|---|---|---|
| Domain name | The domain to query DNS records for | Required |
| Record type | The DNS record type to query (A, AAAA, CNAME, MX, TXT, NS) | A |
| Expected values | Values that must appear in the records, one per line. Part of a record is enough, so v=spf1 matches your SPF record | Empty (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:
| Field | Description |
|---|---|
| Domain | The domain that was queried |
| Record Type | The DNS record type that was queried |
| Record Count | Total number of records returned by the DNS server |
| Resolved Records | The actual DNS records returned |
| Expected Count | Number of expected records configured |
| Found Count | Number of expected records that were found in the response |
| DNS Errors | Any errors returned by the DNS server (NXDOMAIN, SERVFAIL, etc.) |
| Query Time | Time 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
{
"domain": "example.com",
"recordType": "A",
"expectedRecords": ["93.184.216.34"]
}MX Record Check
{
"domain": "example.com",
"recordType": "MX",
"expectedRecords": ["mail1.example.com", "mail2.example.com"]
}TXT Record Check
{
"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.