Open the DNS settings for any domain and you’ll see a list of cryptic letters: A, AAAA, CNAME, MX, TXT. Edit the wrong one and your website or email can disappear. The good news is that each DNS record type has one clear job, and once you know them, DNS stops being scary.
This guide explains what each common record does, how they work together, and the mistakes to avoid.
How DNS records work together
A DNS zone is a set of instructions for your domain. Each record has a name (such as @ for the root domain or www), a type, a value, and a TTL that controls how long it can be cached.
When someone visits your site, their browser asks for the A or AAAA record. When someone emails you, their mail server asks for your MX records. Services like Google check TXT records to confirm you own the domain. Different questions, different records — all in the same zone.
A and AAAA records
- A record: points a name to an IPv4 address, for example
@ → 203.0.113.10. - AAAA record: does the same for an IPv6 address, such as
2001:db8::1.
These are the records you change when you move your website to a new host. If your host supports IPv6, add both. Step-by-step instructions are in How to Point a Domain to Your Hosting.
CNAME records and their limits
A CNAME makes one name an alias of another name. For example, www → yourdomain.com or shop → shops.myplatform.com. When the target’s IP changes, the alias follows automatically.
Important limits:
- A CNAME can’t sit on the root domain (
@) at most providers. Some offer “CNAME flattening” or ALIAS records to work around this. - A name with a CNAME can’t have any other records. Don’t add a CNAME to a name that also needs MX or TXT records.
MX records for email
MX records tell the world which servers accept email for your domain. Each has a priority number: lower numbers are tried first, and higher numbers act as backups.
Your email provider gives you the exact MX values. Delete old MX records when you switch providers, or some messages may go to the wrong place. Not sure whether you need separate email hosting? Read Email Hosting vs Web Hosting: Do You Need Both?.
TXT, SRV and CAA records
- TXT records hold text. They’re used to verify domain ownership and to publish email authentication rules: SPF, DKIM, and DMARC. Keep only one SPF record per domain.
- SRV records point specific services (such as some chat or calendar tools) to a host and port. You’ll only add them when a service tells you to.
- CAA records list which certificate authorities may issue SSL certificates for your domain — a small but useful security step.
Email authentication is explained in Email Deliverability: SPF, DKIM and DMARC in Plain English.
Key takeaways
- A and AAAA records point names to IP addresses.
- A CNAME aliases one name to another, but not on the root domain.
- MX records route email; TXT records prove ownership and protect mail.
- Screenshot your zone before editing anything.
