Networking & DNS

Customise DNS zone templates in WHM (root guide)

Edit the DNS zone templates WHM uses for new accounts as root: default records, TTLs, SPF and CAA records, and the variables available, so every new zone is right from the start.

AdvancedWHM (root)2 min read

When WHM creates an account, it builds the domain's DNS zone from a zone template. Editing the templates means every new zone gets your preferred records, for example a stricter SPF record, a CAA record or different TTLs, without fixing zones by hand.

MdmHost maintains zone templates on its servers. This guide is for administrators of their own cPanel server.

Before you start

  • Root access to WHM.
  • A test domain to check the result.

Open the templates

  1. Go to WHM → DNS Functions → Edit Zone Templates.
  2. Choose a template:
    • standard: used for normal accounts.
    • simple: minimal records.
    • standardvirtualftp: used when FTP uses virtual hosts.

Template variables

VariableReplaced with
%domain%The account's domain
%ip%The account's IP address
%nameserver%, %nameserver2%Configured nameservers
%ttl%, %nsttl%Default TTL values
%serial%The zone serial

Useful changes

  • CAA record limiting which authorities may issue certificates for new domains, including the one AutoSSL uses:
%domain%. IN CAA 0 issue "sectigo.com"
  • TTLs: keep the default unless you have a reason; lower TTLs increase DNS query load.
  • Extra subdomains: for example a default autoconfig record for mail clients, if your setup provides it.

Warning: A broken template creates broken zones for every new account. Keep a copy of the original, and test with a throwaway account after each change.

SPF and DKIM

SPF and DKIM records for new accounts are usually created by cPanel's email authentication features rather than the template. Check them after creating an account in Email Deliverability (see email deliverability).

Existing zones

Templates apply only to new zones. To apply changes to existing domains, edit them in Zone Manager or reset them to the new template with Reset a DNS Zone, which removes custom records.

Test

  1. Create a test account.
  2. Open its zone in Zone Manager and check the records.
  3. Run dig CAA testdomain.com +short or similar to confirm.

If you use a DNS cluster, new zones sync to all nodes (see DNS clusters).

Frequently asked questions

Do resellers use the same templates?

Yes. Templates are server-wide, so all new accounts, including resellers' customers, use them.

Can I add Google verification by default?

No; verification records are per customer. Add them to individual zones when needed.

Will cPanel updates overwrite my templates?

Custom templates are normally preserved. Recheck them after major cPanel upgrades.

Should I add a DMARC record to the template?

A basic DMARC record with p=none is a reasonable default for new domains. Customers can tighten it later.

How do I undo a template change?

Paste back your saved copy of the original template and save. Zones already created keep their records.

Can templates set IPv6 records?

Yes, AAAA records with the matching IPv6 variable can be included if the server has IPv6 configured.

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.