DNS records and what each one does

A, AAAA, CNAME, MX, TXT and NS — what each record does, when to use it, and what TTL really means.

6 min Updated 18 Jul 2026

DNS is the phone book of the internet: it translates domain names into server addresses. Understanding the record types is essential for anyone running a website or email.

A record

Points a domain name at an IPv4 address. The most commonly used record.

example.com.    A    192.0.2.10

Subdomains work the same way:

blog.example.com.    A    192.0.2.10

AAAA record

Like A, but for IPv6 addresses. If your server has IPv6, create this record too.

CNAME record

Points one name at another name (not at an IP):

www.example.com.    CNAME    example.com.

The benefit: if the IP changes, you update only the target A record and every CNAME follows automatically.

Important limitation: you cannot put a CNAME on the root domain if it also has other records such as MX. Use an A record for the root.

MX record

Defines which server receives email for the domain. The leading number is priority — lower means higher priority:

example.com.    MX    10 mail.example.com.
example.com.    MX    20 backup.example.com.

Here the first server is tried first; if it is unreachable, delivery falls back to the second.

TXT record

Holds free-form text, mostly used for ownership verification and email authentication:

  • SPF — declares which servers may send mail on your domain's behalf
  • DKIM — cryptographic signatures for your outgoing mail
  • DMARC — policy for handling forged mail
  • Domain ownership verification for services such as Google

NS record

Declares which nameservers are authoritative for your domain. You set this at your domain registrar, not in the DNS panel.

What is TTL?

TTL means "time to live" and controls how many seconds DNS resolvers cache an answer.

  • High TTL (e.g. 86400 = one day) — better caching, less load, but changes take longer to appear.
  • Low TTL (e.g. 300 = five minutes) — changes propagate much faster.

Practical tip: if you are planning a server migration, lower the TTL several hours beforehand. Then when you make the real change, propagation is nearly immediate. Raise it again once the migration is done.

Why don't changes apply instantly?

This delay is called DNS propagation, and caching is the cause: resolvers around the world hold the previous answer until the TTL expires. It typically takes anywhere from a few minutes to 24 hours.

To inspect a domain's current records, use ServerNet's full DNS lookup tool, which reports every record for a domain in one place.

Was this page helpful?