Skip to content

Intermittent DNS failures — diagnostic order for cPanel hosts

A zone that resolves "sometimes" rarely has one cause. Here is the diagnostic order — cluster sync, EDNS, resolver-specific behaviour, upstream filtering.

A customer reports their site is “down” for some users but “up” for others. From the operator’s laptop everything resolves. From the customer’s home Wi-Fi it doesn’t. From mobile data it works again. Cluster status looks green, named is running, the zone file is current. Intermittent DNS failures rarely have one root cause — they’re usually a stack of small things that combine into a particular failure pattern for a subset of users.

What’s happening

“Sometimes resolves” can mean any of:

  • One node in a DNS cluster is out of sync and serving stale data. Resolvers that happen to query that node get the wrong answer.
  • The authoritative nameserver returns truncated UDP responses, and resolvers that don’t fall back to TCP fail.
  • EDNS0 (Extension Mechanisms for DNS) is misconfigured — some resolvers send EDNS, the server doesn’t handle it, the response is malformed.
  • A firewall between the resolver and the nameserver blocks port 53/TCP, breaking large responses (especially DNSSEC).
  • Some resolvers cache aggressively and serve stale answers past their TTL.
  • The zone is signed with DNSSEC and one resolver validates while another doesn’t — validation failure produces SERVFAIL, non-validation succeeds.

The diagnostic order: confirm cluster consistency, then resolver behaviour, then transport.

How to verify

Cluster consistency first:

for ns in ns1.example.com ns2.example.com ns3.example.com; do
  echo -n "$ns: "
  dig @$ns +short SOA example.com | awk '{print $3}'
done

All serials should match. If they don’t, you’ve found drift.

Test the specific failing resolver if you can get the user to share it:

# user shares: "my DNS is 192.0.2.5"
dig @192.0.2.5 +short example.com A
dig @192.0.2.5 +short example.com A +tcp

If UDP works and TCP doesn’t (or vice versa), it’s a transport issue.

Test EDNS behaviour:

dig +edns=0 +noad +bufsize=4096 example.com @ns1.example.com
dig +noedns example.com @ns1.example.com

If +edns=0 fails but +noedns succeeds, the nameserver has EDNS issues.

Test response sizes:

dig +short example.com ANY +bufsize=512
dig +short example.com ANY +bufsize=4096

A response larger than 512 bytes truncates over UDP. The resolver should retry over TCP. If TCP is blocked, the larger response is lost.

For DNSSEC:

delv example.com
dig +dnssec example.com | grep ad

delv will validate the chain and return errors if any link is broken.

What to do

  1. Force a cluster resync if any node is drifting:
/scripts/dnscluster reload
for zone in $(whmapi1 dumpzone --output=jsonpretty | jq -r '.data.zone[].name'); do
  /scripts/dnscluster synczone $zone
done
  1. Confirm port 53/TCP is open to the nameserver, from anywhere. Cloud firewalls and some networks block 53/TCP by default. Test from an external host:
nc -z -v -w 5 ns1.example.com 53
nc -z -v -w 5 -u ns1.example.com 53
  1. Test EDNS support with the dig commands above. cPanel’s BIND ships with EDNS enabled by default. If it’s broken, check /etc/named.conf for an edns no directive.
  2. Restart named if you’ve made config changes:
/scripts/restartsrv_named
named-checkconf
  1. For DNSSEC issues, see the dnssec-broken-chain article and walk that diagnostic.
  2. Add active monitoring that queries every nameserver from multiple external networks. A monitoring service that polls only from one location won’t catch the kind of intermittent failures users see.

A particularly fun edge case: an upstream ISP has misconfigured response-rate-limiting (RRL) on its recursive resolver. The resolver drops legitimate queries that share a source IP with previous query bursts. The fix is on the ISP, not on you — but recognizing the pattern (random users seeing SERVFAIL from one ISP, with no pattern in your own logs) saves hours of chasing the wrong layer.

Stack Harbor diagnoses intermittent DNS failures as part of cPanel/WHM management.