Skip to content

DNS cluster topology choices for cPanel — what shape fits which workload

How to design the DNS layer behind a cPanel fleet: hidden primary vs primary-secondary, geographic split, anycast considerations, and where to draw the trust boundary.

The DNS layer is the most often misdesigned piece of a cPanel architecture. Default cPanel DNS — authoritative BIND on the WHM box, exposed to the internet on port 53 — works at small scale but fails badly under DDoS, doesn’t survive a single host outage, and offers no geographic redundancy. The fix is a cluster, but the shape matters.

The trade-off

Three common topologies:

  • Standalone authoritative — DNS lives on the WHM host. Simplest; single point of failure for both DNS and DDoS surface.
  • Hidden primary + N public secondaries — the WHM host is the primary but not exposed; named slaves (DNSONLY hosts) sit in the public DNS path. Primary outage doesn’t affect resolution. Standard cPanel pattern.
  • Hidden primary + external anycast secondaries — primary is your WHM cluster; secondaries are a paid anycast service (Cloudflare DNS, AWS Route 53, DNSimple, NS1). Best DDoS posture; highest cost.

How to decide

  1. Fleet under 10 hosts, low risk profile? Standalone or basic primary-secondary with two DNSONLY nodes. Don’t overcomplicate.
  2. Customer-facing brand with reputation cost on DNS outage? Hidden primary plus anycast secondaries. The cost of a DNS outage exceeds the cost of the anycast service.
  3. Compliance regime requires DNS query logging? Be explicit — anycast providers log differently than self-hosted BIND. Match the logging surface to what the auditor needs.
  4. Mail-heavy workload? DNS for MX/SPF/DKIM/DMARC must resolve cleanly from anywhere. Anycast or geographically distributed secondaries help here.
  5. Multi-region cPanel cluster? Authoritative DNS should not be co-located only in one region. Either multi-region secondaries or anycast.

What to do

  1. Default to hidden primary + at least 2 DNSONLY public secondaries on different /24s and ideally different IaaS providers.
  2. Set NS records to point at the secondaries, not the primary. The primary should not appear in dig NS yourdomain.com.
  3. Configure notify-source and transfer-source correctly so secondaries pull from the right interface.
  4. Test failover. Stop named on one DNSONLY node and confirm queries continue answering from the other. Stop named on the primary and confirm zone updates pause but resolution continues.
  5. Monitor zone transfer lag. WHM > Clusters shows it; if it’s growing, the secondary isn’t keeping up.
  6. If you adopt anycast secondaries, push zones via the provider’s API or AXFR depending on what they support. Most anycast providers accept zone push from a hidden primary.
  7. For an example of the anycast layer, see BGP anycast BIRD2 deploy — the underlying pattern even if you don’t run BIRD yourself.

Stack Harbor designs DNS cluster topology per fleet as part of managed cPanel operations.