dns audit · 10 min read
How to Audit DNS Configuration: A Practical Checklist for SREs and Cloud Architects
Learn how to audit DNS configuration without breaking production: a repeatable process for inventorying zones, finding stale records, validating delegation and DNSSEC, and turning findings into fixes.
To audit DNS configuration effectively, you must systematically inspect your zone delegations, validate record-level syntax and apex flattening, prune dangling resources, and verify DNSSEC cryptographic chains against your parent registrar. Knowing how to audit dns configuration end-to-end prevents silent resolution failures, eliminates subdomain hijacking vectors, and maintains predictable cache behavior across cloud-native environments.
Most engineering teams treat DNS as an "install and forget" utility until an expired signature knocks an API offline or a dangling record exposes internal endpoints. A structured audit shifts your authoritative DNS from an unmanaged source of operational risk to a hardened, declarative foundation of your cloud infrastructure.
Why DNS Audits Fail (and What a Good One Produces)
Most DNS audits fail before the first query executes because engineers begin with ad-hoc CLI tools instead of a bounded scope. Pointing dig or an open-source scanner at your primary domain without identifying target environments, delegation boundaries, and authoritative sources yields noise rather than insight. Knowing how to audit dns configuration requires defining precisely which zones, staging environments, legacy domains, and risk tiers fall under inspection.
A production-ready audit delivers four tangible engineering artifacts:
- Zone Inventory: A validated catalog of all primary zones, delegated child domains, and their authoritative nameserver pairs.
- Record-Level Findings List: An itemized inventory of syntax violations, apex conflicts, orphaned targets, and inconsistent Time-to-Live (TTL) values, categorized by blast radius.
- Delegation and DNSSEC Status Report: An end-to-end cryptographic and parent-child delegation verification report matching parent DS records to child DNSKEY sets.
- Remediation Plan: A scheduled, owner-assigned backlog with explicit change-window runbooks and rollback checkpoints.
Engineers often confuse a point-in-time audit with continuous configuration drift detection. An audit establishes your known-good baseline; CI/CD guardrails and declarative infrastructure definitions keep that baseline intact over time. Auditing workflows frequently stumble on three common pitfalls: auditing only the top-level corporate domain while ignoring delegated subzones hosted across disparate cloud accounts; treating TTLs as cosmetic settings rather than strict operational timers; and inspecting zone records while skipping the parent registrar's Delegation Signer (DS) entries.
Before executing queries, align your engineering team around a standardized scoping worksheet:
| Audit Scope Parameter | Production Standard | Status / Sign-off |
|---|---|---|
| In-Scope FQDNs & Zones | All registered apex domains, public child zones, and routing aliases | Documented & approved |
| Cloud Accounts & Registrars | All registrar credentials, cloud IAM roles, and external DNS providers | Access confirmed |
| Definition of "Done" | Zero severe misconfigurations, all records mapped to active assets, DNSSEC verified | SRE Lead sign-off |
| Rollback Plan | Pre-audit zone exports backed up to secure object storage | Verified readable |
Step 1: Build a Complete Zone and Delegation Inventory
An audit cannot protect infrastructure you have not discovered. Cloud sprawl often leads to undocumented subzones provisioned for temporary load tests, ephemeral staging clusters, or marketing microsites hosted on unmanaged accounts. Your first task is to discover every zone where your organization is authoritative.
Walk the delegation hierarchy starting at the root servers and the Top-Level Domain (TLD) parent. As outlined in RFC 1034, recursive resolvers cache intermediate records according to TTL rules, which can mask upstream delegation anomalies during troubleshooting. Query the TLD nameservers directly to evaluate the parent-side delegation against your child-side NS resource record set.
# Query parent TLD nameservers directly for child delegation
dig +trace +nodnssec example.com NS
# Compare parent NS referral with authoritative zone response
dig @ns1.dnscove.com example.com NS +noadditional +noauthority
A parent-child mismatch occurs when the parent nameserver delegates a zone to one set of hosts, but the child zone's authoritative NS RRset returns a different set. Resolvers caching the child's response may cycle through stale servers, creating intermittent lookup failures that baffle engineering teams.
Validate your glue records and nameserver hostnames:
- If your nameservers reside inside the zone they serve (in-bailiwick, e.g.,
ns1.example.comforexample.com), ensure the parent registry contains correct A and AAAA glue records. Missing or incorrect glue records result in circular resolution loops. - If your nameservers reside outside the zone (out-of-bailiwick), confirm that those nameserver hostnames resolve reliably to their target IPs.
Customer zones are delegated to the shared ns1.dnscove.com / ns2.dnscove.org nameservers; per-customer vanity or white-label nameservers are not supported in v1. Document the exact nameserver set for every production domain in your catalog. For cross-account verification, check out our guide on troubleshooting DNS resolution errors and authoritative nameservers.
Step 2: How to Audit DNS Configuration at the Record Level
Once you map the delegation boundary, evaluate every individual resource record. When evaluating how to audit dns configuration across complex environments, extract zone records through your authoritative provider's management API or configuration exports to inspect the underlying entries directly.
Before diffing or parsing, normalize your records: append trailing dots to all fully qualified domain names (FQDNs), lowercase all domain labels, and expand relative names to prevent false mismatches. Unintended subdomains frequently occur when administrators omit the trailing dot in a zone file target, accidentally creating records like lb.production.example.com.example.com.
Audit your records against critical protocol and routing rules:
- CNAME at the Apex: RFC 1912 states that a CNAME record cannot coexist with other data for the same name. Because the apex (e.g.,
example.com) must containSOAandNSrecords, placing a standard CNAME at the apex violates protocol specifications and breaks email and zone authority. DNSCove supports apex ALIAS records (CNAME-at-apex flattening, like Route53 Alias) with serve-stale protection. For detailed implementation mechanics, review our guide to CNAME flattening for apex domains. - CNAME Coexistence Violations: Subdomains containing a CNAME cannot carry
TXT,MX, or other record types. If a microservice requires validation TXT records alongside a CNAME target, you must restructure the record hierarchy. - Email Authentication Alignment: Inspect your
MX,SPF(TXT),DKIM, andDMARCrecords. Ensure your SPF record does not exceed the strict 10-DNS-lookup limit defined in RFC 7208, and enforce explicit DMARC alignment (p=rejectorp=quarantine) to protect your domain reputation. - Shadowing Wildcards: Review wildcards (e.g.,
*.example.com). Wildcards can mask missing specific records, cause unexpected routing to default endpoints, and complicate debugging during incidents.
Review this record-level validation checklist ordered by potential blast radius:
| Check | Protocol Rule / Target | Blast Radius | Audit Verification Method |
|---|---|---|---|
| Apex Configuration | No apex CNAME; ALIAS or A/AAAA only | Entire Zone | dig @ns1.dnscove.com example.com CNAME returns empty |
| Subdomain Collision | No CNAME sharing a label with TXT/A | Specific Hostname | Audit API export for duplicate record owners |
| Trailing Dot Syntax | Absolute FQDNs must end with . |
Service Outage | Regex scan for non-dotted zone file targets |
| SPF Lookup Depth | Total DNS evaluations <= 10 | Outbound Mail | Count recursive include: mechanisms |
Identifying Stale DNS Records Without Breaking Things
Stale DNS records represent silent technical debt that can metastasize into severe security vulnerabilities. Identifying stale dns records is critical to maintaining zone hygiene and avoiding dangling-endpoint risks.
Define what constitutes a "stale" record in your infrastructure:
- A record whose query volume has dropped to zero over the past 30 to 90 days.
- A record pointing to cloud resources (such as AWS S3 buckets, Azure App Services, GitHub Pages, or Elastic Load Balancers) that have been decommissioned or deleted from cloud accounts.
- A record pointing to static IP addresses no longer registered in your IP Address Management (IPAM) or Cloud CMDB.
- Records lacking an identifiable owner or service tag in your infrastructure repository.
Do not simply delete quiet records without context. Low-traffic records often support critical, rarely invoked functions, such as disaster recovery failover endpoints, third-party domain validation checks, or audit-specific endpoints. To avoid outages, cross-reference candidates against query logs, active cloud resources, and the Subject Alternative Names (SANs) in your TLS certificates.
Adopt a safe four-phase quarantine workflow before removing records permanently:
- Discovery & Correlation: Cross-reference zone exports against active cloud inventory APIs (load balancers, ingress controllers, static IPs). Flag unmatched records as decommissioning candidates.
- TTL Reduction: Lower the candidate record's TTL to 60 or 300 seconds. If an unexpected dependency surfaces during subsequent steps, the low TTL allows near-instant rollback.
- Quarantine (Blackholing / Pointing to Sinkhole): Change the record to resolve to an internal telemetry sinkhole or remove it during an announced operational maintenance window. Monitor observability logs for unexpected connection resets or NXDOMAIN spikes.
- Permanent Pruning: If no alert fires and no upstream service degrades after two weeks in quarantine, delete the record from your declarative zone configuration. Retain a version-controlled backup of the dropped record.
For more programmatic techniques, review our complete DNS zone file audit checklist.
TTL, Caching, and Propagation: Auditing the Timing Layer
Time-to-Live (TTL) settings dictate how intermediate resolvers and end-user clients cache your authoritative data. An audit of your timing layer ensures your records balance caching efficiency against incident-response agility.
Setting optimal TTL values requires balancing update agility against resolver caching. While shorter TTLs facilitate rapid rollback, excessively low values (such as many seconds) on static infrastructure can increase recursive query traffic and leave clients vulnerable if upstream connectivity fluctuates.
Audit your TTL consistency across records that must change concurrently. If your apex ALIAS record has a TTL of 300 seconds while your www CNAME has a TTL of 86,400 seconds, a migration will cause your root domain and www hostname to resolve to different infrastructure for up to a full day, leading to split-state operational headaches.
Examine your Start of Authority (SOA) negative caching parameter—the final value in the SOA record tuple defined in RFC 2308. When a recursive resolver queries a non-existent name (NXDOMAIN), it caches that negative response for the duration specified by the SOA minimum TTL. If this value is set to 86,400 seconds, creating a new record during a migration will not take effect for clients that queried the name early until the 24-hour negative cache expires.
| Record Class | Recommended TTL | Operational Rationale |
|---|---|---|
| Apex ALIAS / Primary Ingress | 60s – 300s | Enables rapid traffic rerouting during cluster migrations or failover |
| Internal Services / Staging | 300s | Minimizes latency while maintaining agility for rolling deployments |
| Static Infrastructure (MX, NS) | 86,400s (24h) | Infrastructure changes infrequently; benefits from deep upstream caching |
| Verification TXT Records | 3,600s – 86,400s | Infrequent updates; stable validation tokens |
| SOA Minimum (Negative Cache) | 300s – 900s | Prevents prolonged NXDOMAIN caching during new service rollouts |
Before major infrastructure transitions, implement a pre-migration TTL step-down runbook: 72 hours prior to the migration, drop the target record TTL to 300 seconds. Once the migration concludes and the new endpoints stabilize, restore the TTL to your standard steady-state profile.
DNS Security Audit Checklist: DNSSEC, Delegation, and Zone Hygiene
A resilient DNS posture requires validating the cryptographic integrity of your responses. A rigorous dns security audit checklist ensures that every resolver can verify your records and rejects tampered responses.
Inspect DNSSEC from the root down to your zone's apex. A misconfigured DNSSEC chain is far more dangerous than an unsigned zone: if a key signature expires, or if the parent registrar publishes a Delegation Signer (DS) record that mismatches your zone's DNSKEY, validating resolvers worldwide will return SERVFAIL, cutting off client traffic completely.
# Query child DNSKEY records
dig @ns1.dnscove.com example.com DNSKEY +multiline
# Query parent TLD for corresponding DS record
dig @a.gtld-servers.net example.com DS +multiline
Ensure your DNSSEC implementation follows modern cryptographic standards. Validate that your zone uses ECDSA Curve P-256 with SHA-256 (Algorithm 13), which provides robust security with minimal payload size, reducing UDP truncation and fragmentation issues. When using NSEC3 for authenticated denial of existence, align your zone parameters with RFC 9276: Guidance for NSEC3 Parameter Settings, which recommends setting iterations to zero and using an empty salt to prevent nameserver CPU exhaustion attacks.
Modern registrars and DNS platforms simplify trust maintenance through Child DS (CDS) and Child DNSKEY (CDNSKEY) records. As defined in RFC 7344: Automating DNSSEC Delegation Trust Maintenance and updated by RFC 8078: Managing DS Records from the Parent via CDS/CDNSKEY, your authoritative nameserver can publish these records so supporting registries can ingest and update parent DS records automatically
- No AWS account required
- Zero-downtime Route 53 cutover
- Apex ALIAS / ANAME to any target
- DNS as code — Terraform, CloudFormation
Straight answer: DNSSEC signing isn't available yet — it's on the roadmap. Everything else here works today. Authoritative nameservers: ns1.dnscove.com, ns2.dnscove.org.