Create Custom DNS Zones in WHM โ
WHM includes a full DNS server (BIND). This guide covers adding DNS zones, editing records, and the most common record types you'll work with.
Adding a new DNS zone โ
A DNS zone needs to exist before a domain can be hosted or have DNS records managed from WHM.
- Go to DNS Functions โ Add DNS Zone.
- Enter the IP Address the zone's A record should point to (your server IP).
- Enter the Domain name.
- Click Add. WHM creates the zone with default records (A, MX, NS, SOA).
Zones are created automatically for new accounts
When you create a cPanel account, WHM automatically creates the DNS zone for the primary domain. You only need to manually add a zone for domains that aren't attached to a cPanel account. Editing a DNS zone โ
- Go to DNS Functions โ Edit DNS Zone
- Select the domain from the dropdown
- The zone editor shows all existing records
- Modify values directly in the text fields
- Click Save when done
Common record types โ
A record โ
Maps a hostname to an IPv4 address.
| Name | TTL | Type | Value |
|---|---|---|---|
yourdomain.com. | 14400 | A | 1.2.3.4 |
www | 14400 | A | 1.2.3.4 |
mail | 14400 | A | 1.2.3.4 |
CNAME record โ
Creates an alias pointing one hostname to another. Cannot be used on the root domain (@).
| Name | TTL | Type | Value |
|---|---|---|---|
shop | 14400 | CNAME | stores.shopify.com. |
blog | 14400 | CNAME | yourdomain.com. |
MX record โ
Routes email for the domain to the correct mail server.
| Name | TTL | Type | Priority | Value |
|---|---|---|---|---|
yourdomain.com. | 14400 | MX | 0 | mail.yourdomain.com. |
TXT record โ
Used for SPF, DKIM, DMARC, and domain verification. No limit on number of TXT records.
| Name | TTL | Type | Value |
|---|---|---|---|
yourdomain.com. | 14400 | TXT | v=spf1 ip4:1.2.3.4 include:mailchannels.net ~all |
_dmarc | 14400 | TXT | v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com |
Always end hostnames with a period
In the WHM zone editor, fully qualified domain names must end with a period: mail.yourdomain.com. not mail.yourdomain.com. Missing the trailing period causes the server to append the zone name, creating incorrect records. Checking DNS from command line โ
bash
# Check A record
dig yourdomain.com A +short
# Check MX
dig yourdomain.com MX +short
# Check all TXT records
dig yourdomain.com TXT +short
# Check from a specific nameserver
dig @ns1.remarkablecloud.com yourdomain.com AReloading DNS after changes โ
WHM reloads BIND automatically when you save a zone. If changes don't appear immediately, force a reload:
bash
/scripts/restartsrv_named
