DNS Records Explained: A, CNAME, MX and TXT
DNS is the internet's address book. When someone types your domain, their computer asks DNS where to send the request. The records below are the entries in that book — each answers a different question.
A record — where the website lives
Points a name at an IPv4 address.
Type: A Name: @ Value: 203.0.113.45
Type: A Name: www Value: 203.0.113.45@ means the domain itself. You almost always want both @ and www — visitors and old backlinks will use either, and a missing www record means half your traffic hits nothing.
AAAA is the same thing for IPv6 addresses. Optional but harmless.
CNAME — an alias to another name
Points a name at another name rather than an IP.
Type: CNAME Name: shop Value: myshop.someplatform.comUseful when the destination's IP might change — the provider updates their own record and yours follows automatically.
The rule that catches people: a CNAME cannot coexist with any other record for the same name. You cannot have a CNAME on @ alongside MX records, which is why your root domain uses an A record and subdomains often use CNAMEs.
MX record — where email goes
Tells other mail servers where to deliver your mail. Independent of your A record: your website can be here and your email elsewhere.
Type: MX Name: @ Value: mail.yourdomain.com Priority: 0Priority is a preference — lower is tried first. A backup server gets a higher number.
The mistake that breaks email: changing nameservers without recreating MX records. If your mail is with Google Workspace or Microsoft 365 and you move nameservers to your host, the host's MX records apply and your mail stops. Recreate the correct MX records *before* the switch.
TXT record — text for machines
Free-form text, used for verification and email authentication. Three matter:
SPF — which servers may send mail as you:
``
v=spf1 +a +mx ~all
``
You may only have one SPF record. Multiple records is a hard failure.
DKIM — the public key that verifies your mail signatures. cPanel generates it.
DMARC — what to do when SPF or DKIM fails:
``
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
``
All three are covered properly in our deliverability guide. If your mail goes to spam, that is where to look.
TXT records are also how Google Search Console and similar services verify you own the domain.
NS record — who is in charge
Names the servers authoritative for your domain. Set at your registrar, not in cPanel. For us:
ns1.nexzahost.com
ns2.nexzahost.comChanging these hands over all DNS management, which is why MX records must be right on the new side first.
SRV and CAA
SRV points at a service on a specific port — used by VoIP and chat systems. You will be given the exact values if you need one.
CAA restricts which certificate authorities may issue certificates for your domain. If you add one, include letsencrypt.org or AutoSSL will stop working.
TTL — how long the answer is cached
Time To Live, in seconds. Other servers cache your record for this long before asking again.
- 3600 (1 hour) is a sensible default
- 300 (5 minutes) before a planned change, so the switch propagates fast
Lower the TTL a day before any migration. This single habit turns a scary DNS change into a five-minute one.
Editing records in cPanel
Domains → Zone Editor → Manage. Add, edit or delete records there.
Three rules that prevent most incidents:
1. Screenshot the zone before changing anything. Recovering from a note is easy; recovering from memory is not. 2. Change one record at a time and verify before the next. 3. Never delete MX records unless you are certain mail is handled elsewhere.
Checking your work
nslookup yourdomain.com
nslookup -type=MX yourdomain.com
nslookup -type=TXT yourdomain.comOr use any online DNS checker, which shows results from several locations at once — useful during propagation when different resolvers legitimately disagree for a while.
If a change has not appeared after 24 hours, something is wrong. Send us the domain and what you expected, and we will look.
Related articles
How to Register a .pk Domain with PKNIC
What PKNIC requires to register a .pk domain, which second-level extension to pick, what it costs, and how to avoid losing the name at renewal.
.com or .pk for a Pakistani Business?
An honest comparison of .com and .com.pk for businesses in Pakistan — trust, reach, cost, SEO impact, and when registering both is the right call.
How to Set Up Cloudflare with Your Hosting
Add Cloudflare in front of your NexzaHost site without breaking SSL or email, including the one SSL setting that causes redirect loops.
Was this article helpful?
Still stuck?
Our support team is available 24/7.