DrivenHost

Knowledgebase / Domains & DNS

Add or edit DNS records in cPanel's Zone Editor

Add A, CNAME, MX, and TXT records in cPanel's Zone Editor, understand TTL, and avoid the trailing-dot mistake everyone makes once.

Sooner or later you'll need to add a DNS record: a TXT record to verify a service, an MX record for an email provider, a subdomain pointing somewhere. This guide covers doing that in cPanel's Zone Editor. One prerequisite matters: your domain's nameservers must point at your hosting. If DNS is managed elsewhere, records you add here do nothing.

The four record types you'll actually use

  • A points a name at an IPv4 address. Example: shop.yourdomain.com to 203.0.113.10. Use it for subdomains and for the bare domain itself.
  • CNAME points a name at another name, which is then looked up in turn. Example: www to yourdomain.com. Use it when a service says "point your subdomain at ourapp.example.net". Never put a CNAME on the bare domain itself; DNS doesn't allow it alongside the other records the bare domain needs.
  • MX tells the world where email for your domain gets delivered. Each MX has a priority number; lower numbers are tried first. If you switch to an outside email provider, their MX records replace yours.
  • TXT holds arbitrary text. In practice that means verification strings ("paste this record to prove you own the domain") and email authentication records like SPF and DKIM.

Add a record

  1. Log in to cPanel and open Zone Editor under the Domains section.
  2. Click Manage next to your domain to see every existing record. (The quick Add buttons work too, but Manage shows you the whole picture.)
  3. Click Add Record, choose the type, and fill in the fields.
  4. In the Name field, enter the host. Typing shop becomes shop.yourdomain.com; cPanel usually appends the domain for you. Check what it saved.
  5. Enter the value: an IP for A records, a hostname for CNAME and MX, the text string for TXT.
  6. Save.

Editing works the same way: find the record under Manage and click Edit next to it. Be careful deleting records you don't recognize; some of them (mail-related ones especially) are doing quiet, important work.

TTL in plain words

Every record has a TTL, "time to live", in seconds. It's how long other networks are allowed to cache the answer before asking again. A TTL of 14400 means a resolver that just looked up your record won't check for changes for up to four hours.

The practical use: if you know a change is coming (say, moving your site to a new IP next week), lower the TTL to 300 a day beforehand. The change then takes effect nearly everywhere in minutes instead of hours. Afterward, put the TTL back up; very low TTLs just mean more lookups for no benefit.

The two classic gotchas

The trailing dot. In zone files, a name ending in a dot (mail.example.net.) is complete, and a name without one gets your domain appended. Get this wrong and you create records pointing at mail.example.net.yourdomain.com, which resolves to nothing. cPanel handles most of this for you, but when a provider's instructions show a value with a trailing dot, that dot is not a typo. After saving, reopen the record and read what actually got stored.

Propagation. Your change is live on the server the moment you save, but networks holding a cached answer keep using it until the old TTL runs out. If a verification service can't see your new TXT record, the usual fix is waiting an hour, not adding the record a second time.

If it didn't work

  • The record has no effect at all. Your nameservers likely point somewhere else, so nobody is reading this zone. Confirm where the domain's nameservers point.
  • A subdomain resolves to something weird. Almost always the trailing-dot problem. Check the stored value for your domain accidentally appended at the end.
  • Mail broke after editing records. Compare your MX, SPF, and DKIM records against what your email setup expects; deleting or shadowing one of these is the usual culprit.

If a record is misbehaving and you can't see why, send the details to /support and we'll take a look at the zone with you.

More in Domains & DNS

Stuck partway through? Support is answered by the engineers who run the servers, around the clock.

← All guides

No sales team. No scripts.

Tell us what you're running.
We'll tell you what it needs.

Migrations are free, quotes are written, and the engineer who replies is on the team that will run your server.