How to Set DNS Zone Records in cPanel
This guide explains how to add and edit DNS zone records (A, CNAME, MX, TXT, DKIM/SPF) in cPanel. Use the instructions below to update records for domains hosted on your cPanel account.
Step 1 — Log in to cPanel
Open your browser and go to https://yourdomain.com/cpanel or sign in via your TrophyHost dashboard.
Step 2 — Open the Zone Editor
- In cPanel, find Domains > Zone Editor, or type
zonein the search bar. - Click Manage next to the domain you want to edit. This opens the DNS records list for that domain.
Step 3 — Add or edit records
cPanel supports several record types. Below are examples and the exact fields to use.
A Record (point a name to an IP)
When to use: Map a hostname (example.com or sub.example.com) to a server IP.
Fields
Name: @ (or sub.example.com)
Type: A
Address: 203.0.113.42
TTL: 3600 (optional)
CNAME Record (alias to another hostname)
When to use: Point a hostname to another hostname (don’t use CNAME for a root record).
Fields
Name: www
Type: CNAME
CNAME: example.com.
TTL: 3600 (optional)
MX Record (mail routing)
When to use: Set mail servers for your domain. Remove old MX records if you switch providers.
Fields
Name: @
Type: MX
Priority: 10
Destination: mx.yourmailprovider.com
TXT Record (SPF, verification, general text)
When to use: Add SPF records, Google/verification tokens, or other provider TXT values.
Fields
Name: @ (or the host provided)
Type: TXT
Record: v=spf1 include:spf.example.com ~all
DKIM (often added as a long TXT)
DKIM entries are supplied by email providers. They typically use a selector and the special subdomain _domainkey.
Example
Name: selector._domainkey.example.com
Type: TXT
Record: "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
Step 4 — Save changes
Click Save or Add Record. Verify there are no duplicate records of the same type for the same host unless intentionally required (e.g., multiple MX records with different priorities).
Step 5 — DNS propagation
DNS updates normally propagate quickly but can take time globally. Typical windows:
- Fast: a few minutes — 1 hour
- Typical: 1–4 hours
- Max: up to 24–48 hours in rare cases
Common troubleshooting
- Invalid DKIM value: Ensure you added it as a TXT record, removed extra quotes and newlines, and used the exact selector/domain provided by the email provider.
- Mail not working after MX change: Check that old MX records were removed and that SPF/DKIM are set correctly.
- Root CNAME errors: A CNAME cannot coexist with other records for the same name (e.g., root A records). Use an A record for root domains.
Quick examples
| Type | Host / Name | Value | Notes |
|---|---|---|---|
| A | @ | 203.0.113.42 | Root domain → server IP |
| CNAME | www | example.com | www alias |
| MX | @ | 10 mx.zoho.com | Zoho Mail example |
| TXT | @ | v=spf1 include:zoho.com ~all | SPF for Zoho |
