cPanel sets every record’s TTL to 14400 by default. That’s 4 hours — fine as a generic value, but wrong for several specific record types. A 4-hour TTL on an A record means slow cutover; a 4-hour TTL on an NS record means slow nameserver change; a 4-hour TTL on a DNSKEY makes DNSSEC rotation expensive. A more deliberate per-type TTL policy reduces cutover pain and improves resolver caching where it matters.
What’s happening
TTL has a trade-off: high TTL means resolvers cache longer, which reduces load on your nameservers and gives users faster lookups (cached responses are local). Low TTL means changes propagate faster but every resolver does more queries. The right TTL depends on the record’s role:
- A and AAAA records for production services — 3600 to 14400. Stable IPs, infrequent changes. Drop to 300 during planned migrations.
- A and AAAA records for failover endpoints — 60 to 300. Fast failover means low TTL. The cost is more resolver queries.
- MX records — 3600 to 14400. Mail flow is stable; the rare MX change can be staged.
- CNAME for SaaS endpoints — 300 to 3600. SaaS providers occasionally re-point, and the indirection adds nothing if you cache for hours.
- TXT for SPF/DKIM/DMARC — 3600. Stable, but you may rotate keys.
- NS records — 3600 to 86400. The TLD has its own NS TTL for delegation; the in-zone NS records are mostly redundant for caching purposes but still need a reasonable TTL.
- SOA — the TTL on the SOA itself controls how long resolvers cache negative answers (NXDOMAIN). 3600 is a reasonable default.
- DNSKEY — 3600 to 7200. Rotation needs an overlap window of at least one DNSKEY TTL.
- CAA — 3600. CAs check at issuance, with their own caching, but a long TTL doesn’t help.
- DS at parent (registrar-managed) — out of your control directly; typically TLD-driven.
cPanel’s default of 14400 is a reasonable middle ground but loses to deliberate per-type choices.
How to verify
Inspect TTLs across the zone:
whmapi1 dumpzone domain=example.com | awk '{print $1, $2, $3}' | sort -k3
dig +noall +answer example.com ANY
Look for records where the TTL is mismatched to its role — e.g., a failover.example.com A record at TTL 14400 defeats the purpose of failover.
What to do
- Set policy per record type, not zone-wide. When you add a record, set the TTL consciously based on the type:
# A record for production website — stable
whmapi1 editzonerecord domain=example.com Line=N name=example.com. ttl=14400 type=A address=192.0.2.10
# A record for failover endpoint — fast switch
whmapi1 editzonerecord domain=example.com Line=N name=ha.example.com. ttl=60 type=A address=192.0.2.20
# MX — stable
whmapi1 editzonerecord domain=example.com Line=N name=example.com. ttl=3600 type=MX priority=10 exchange=mail.example.com.
# TXT for SPF — stable
whmapi1 addzonerecord domain=example.com name=example.com. type=TXT ttl=3600 txtdata='"v=spf1 include:_spf.google.com ~all"'
- Lower TTLs ahead of planned changes, raise them back after. See the low-TTL runbook article.
- Don’t lower TTLs permanently for everything. A 60-second TTL across a zone with 100 records means resolvers re-query every minute. That’s traffic on your nameservers and slower DNS for users.
- For failover and load-balanced records, low TTL is the design intent — keep them at 60 to 300. But understand the cost: the resolver makes a query for every visitor whose cache expired in the last minute.
- For DNSSEC, the DNSKEY TTL governs rollover speed. Common choice is 3600 — fast enough that key rotation takes hours, not days, but slow enough that resolvers aren’t constantly re-fetching the key.
- Document the per-type TTL policy in your team’s runbook. When the next operator looks at the zone, they should be able to tell at a glance whether each TTL is intentional or accidental.
A common subtle issue: a long TTL on an MX record means a mail-provider failover (Microsoft 365 has an outage, you point to a backup MX) takes 4 hours to propagate. If your customers want faster mail-provider failover, the MX TTL needs to be 300 — and the cost of that is more queries against your nameservers, every five minutes per resolver.
Stack Harbor sets per-record-type TTL policies during zone audits as part of cPanel server administration.