DNS is the address book of the internet. Change an A record and you redirect all traffic for a domain. Change an MX record and you silently reroute all incoming email. Change a NS record and you hand control of the entire zone to a different nameserver. These changes take effect within minutes, can affect millions of users, and — unless you have a DNS record change alert in place — are completely invisible until the damage is visible.
Not every DNS change is malicious, but every unexpected DNS change is a risk. Understanding the common causes helps you design a monitoring strategy that covers all of them.
DNS registrars and hosting providers are high-value targets for attackers. Credential stuffing, phishing, and SIM-swapping attacks against registrar accounts allow attackers to modify DNS records directly. Once an attacker controls your A record, they can redirect your site to a phishing page, intercept traffic, or issue fraudulent TLS certificates via DNS-01 challenges. Because DNS propagates globally within minutes, the window for damage is short and the damage can be severe.
Modern infrastructure involves multiple layers: CDN providers, load balancers, origin servers, and DDoS protection services. Each migration or configuration change touches DNS. A Cloudflare migration might change CNAME targets. A load balancer replacement might require new A records. When these changes happen without coordination, or when a rollback is applied inconsistently, DNS records can end up pointing to the wrong destination — not through malice, but through operational complexity.
Terraform and other infrastructure-as-code tools manage DNS records alongside compute resources. A terraform destroy on a decommissioned environment can cascade to DNS records that other services still depend on. Manual edits to DNS zones — particularly in providers that lack change tracking — can overwrite records without an audit trail. A TXT record for email authentication can be silently removed during a zone import.
A CNAME pointing to a cloud service that has since been deprovisioned is a subdomain takeover waiting to happen. An attacker who provisions the same cloud resource (an S3 bucket, a Heroku app, an Azure endpoint) can serve content from your subdomain. This is one of the most common ways that apparently legitimate-looking phishing pages end up on company-owned subdomains — and a DNS record change alert catches the CNAME target becoming claimable before an attacker acts.
Not all DNS records carry the same risk profile. Here is what to watch and why:
| Record Type | What it controls | Risk if changed |
|---|---|---|
A / AAAA |
IP address for the domain | Traffic redirection, phishing, interception |
CNAME |
Alias to another hostname | Traffic redirection, subdomain takeover |
MX |
Mail server routing | Email interception, delivery failure |
NS |
Authoritative nameservers for the zone | Full zone takeover, all records affected |
TXT |
SPF, DKIM, DMARC, domain verification | Email spoofing, authentication bypass |
SOA |
Zone authority and serial number | Signals zone changes; serial increments on any update |
NS record changes carry the highest risk because they affect the entire zone — changing your nameservers hands control of all records to a different provider. MX changes are the most operationally damaging after security incidents because email disruption is immediate and often hard to diagnose.
Before setting up monitoring, establish a baseline. The standard command-line tool for DNS lookups is dig:
# Check A record
dig A example.com +short
# Check MX records
dig MX example.com +short
# Check NS records
dig NS example.com +short
# Check all records (may not return everything, but useful for a quick scan)
dig ANY example.com +short
To see what a specific nameserver returns (useful for spotting propagation inconsistencies), specify the server directly:
# Query against a specific nameserver
dig A example.com @8.8.8.8 +short
dig A example.com @1.1.1.1 +short
If you want to check without installing anything locally, the free DNSWatch checker tool lets you look up all record types for any domain instantly from your browser, including NS, MX, TXT, and CNAME records in one view.
Developers who want to detect DNS changes often start with a manual polling script — a cron job that runs dig, stores the output, and diffs it against the previous run. This works at small scale and provides a useful mental model for what monitoring tools do:
#!/bin/bash
DOMAIN="example.com"
CURRENT=$(dig A "$DOMAIN" +short | sort)
STORED=$(cat /tmp/dns-baseline-"$DOMAIN" 2>/dev/null)
if [[ "$CURRENT" != "$STORED" ]]; then
echo "DNS CHANGE DETECTED for $DOMAIN:"
diff <(echo "$STORED") <(echo "$CURRENT")
echo "$CURRENT" > /tmp/dns-baseline-"$DOMAIN"
fi
The limitations of this approach emerge quickly when you have more than a handful of domains:
Purpose-built DNS record change monitoring tools poll from multiple geographic vantage points, cover all record types simultaneously, maintain a change history with diffs, and route alerts to your existing notification channels. They turn DNS change detection from a side project into a solved problem.
The value of a DNS record change alert is clearest in concrete cases:
Scenario 1 — Registrar account compromise: An attacker phishes credentials for your domain registrar and changes your A record to point to a cloned phishing site at 3am. Without monitoring, you find out when your users start reporting the phishing page — typically hours later. With a DNS change alert, you receive a notification within minutes of the record changing and can begin incident response immediately.
Scenario 2 — Terraform destroy in staging: An engineer runs terraform destroy on a staging environment and the Terraform state includes a DNS record shared with production. The production CNAME is deleted. Without monitoring, traffic starts failing and the cause is unclear. With a DNS change alert, the deletion is captured and attributed to the specific change.
Scenario 3 — CDN migration creates a dangling CNAME: A CDN provider is decommissioned but a CNAME pointing to the old CDN endpoint remains in DNS. A competitor — or attacker — provisions the same CDN resource name and begins serving traffic from your subdomain. A DNS change alert on CNAME records catches the moment the CNAME starts resolving to a different endpoint.
DNS record changes are high-impact and fast-propagating. An A record change redirects traffic globally within minutes. An MX record change silently reroutes all email. An NS record change hands control of your entire zone to a different provider. Manual checking misses changes that happen between queries. Automated polling from a single vantage point misses changes that are resolver-specific.
A DNS record change alert — one that monitors continuously, covers all record types, queries from multiple points, and notifies you immediately — is the only way to detect unexpected changes before they cause user-visible damage. Check your current DNS state now with the free DNSWatch checker, then set up automated monitoring so you're not the last to know when something changes.
DNSWatch monitors your domains across all record types and sends instant alerts when anything changes — so you catch unauthorized changes, misconfigurations, and CDN drift before they cause outages.
Join the waitlist at https://lior-seats.github.io/dnswatch-waitlist/
Join the DNSWatch Waitlist Check Your DNS Records (Free)© 2026 Developer Tools Blog