Skip to main content
SD
SabyDomain
Registrar
SabyDomain Editorial Team·Published 5 Jun 2026·7 min read

A, CNAME, MX & TXT Records Explained

A clear, example-led guide to the four DNS records you'll actually use — A, CNAME, MX and TXT — and what each one is for.

Server racks representing DNS records — A, CNAME, MX and TXT

Most people only ever need four DNS records, and once you've seen DNS records explained with real examples, editing them stops feeling intimidating. This guide covers the four you'll actually use — A, CNAME, MX and TXT — what each does, and when to reach for it. If you want the bigger picture of how DNS works first, start with our beginner's guide, then come back here for the practical detail.

A record — point a name to an IP address

An A record connects your domain to a server's IPv4 address — the numeric address where your website lives. For example, an A record on @ pointing to 192.0.2.10 says 'when someone visits my root domain, send them to this server'. This is the record that puts a website online. There's also an AAAA record, which does the same job for newer IPv6 addresses.

CNAME — point a name to another name

A CNAME (canonical name) points one hostname at another instead of at an IP. The classic use is making www.yourbrand.com follow yourbrand.com, so both show the same site. Builders and platforms also use CNAMEs to connect your domain to their servers. One rule worth knowing: you can't put a CNAME on your root domain alongside other records, which is why the root usually uses an A record and www uses a CNAME.

MX record — route your email

An MX (mail exchange) record tells the internet where to deliver email for your domain. Each MX record has a priority number — lower numbers are tried first — so your provider can offer backups. Without correct MX records, email to your domain simply fails, so these are essential the moment you want professional email. Our email guide walks through adding them step by step.

TXT record — verification and security

A TXT record holds plain text, and it's used for two main things: proving you own a domain (services ask you to add a verification string) and securing your email. SPF, DKIM and DMARC are all TXT records that stop others from spoofing your address and keep your messages out of spam. They look cryptic, but you simply paste in the exact value your provider gives you.

Quick reference

  • A — domain to IPv4 address (websites)
  • AAAA — domain to IPv6 address
  • CNAME — name to another name (e.g. www)
  • MX — routes email to your mail provider
  • TXT — verification and email security (SPF, DKIM, DMARC)

With these five in your toolkit you can connect a website, run email, and verify your domain with almost any service. Take changes one record at a time and wait for propagation between edits, and DNS becomes routine.

Understanding the parts of a record

Every DNS record has the same basic shape, and once you recognise the parts, any provider's editor looks familiar. There's the name or host (which part of your domain the record applies to, with @ meaning the root), the type (A, CNAME, MX and so on), the value (where it points — an IP, a hostname or a text string), and the TTL (how long the answer may be cached). MX records add a priority number on top. When a guide tells you to 'add an A record on @ pointing to 192.0.2.10', it's just filling in those fields.

A note on TTL

TTL, measured in seconds, decides how long other computers remember a record before checking again. A higher TTL means faster lookups but slower updates; a lower TTL means changes spread quickly but with slightly more lookups. For everyday records the default is fine — only lower it deliberately before a planned change so the update takes effect sooner.

FAQ

What's the difference between an A record and a CNAME?

An A record points to a numeric IP address; a CNAME points to another domain name. Roots usually use A, while www uses a CNAME.

Which record do I need for email?

MX records route your email, and TXT records (SPF, DKIM, DMARC) secure it against spoofing.

Written by

SabyDomain Editorial Team

Domain & DNS specialists at Saby Infotech

The SabyDomain team registers and manages domains for Tanzanian businesses every day. We write these guides to make getting online simple — from choosing a name to DNS, transfers and renewals.

Ready to get your domain?

Search your name and pay with mobile money in TZS.