DNS Record Types Explained: A, MX, CNAME, NS and TXT

Quick answer: DNS records tell internet services how to reach a domain. A records direct names to IPv4 addresses, MX records route email, CNAME records define aliases, NS records identify authoritative nameservers, and TXT records store verification and policy information. Start with our introduction to DNS if you are new to the topic.

Common DNS Records

  • A Record: Links a domain to an IPv4 address (e.g., www.example.com -> 192.0.2.1).
  • MX Record: Directs email to mail servers for the domain.
  • CNAME Record: Points a domain to another domain (e.g., blog.example.com -> example.com).
  • NS Record: Specifies which DNS servers handle the domain.
  • TXT Record: Stores text info like email verification (e.g., SPF, DKIM).

How DNS affects websites and email

When you move a website to a new host, its A or AAAA record may need to change. When you switch email services, your MX records may need updating. SPF, DKIM and DMARC use DNS to help receiving mail systems assess email authenticity; they do not replace MX records. Follow our SPF, DKIM and DMARC setup guide for a practical explanation, including why you should avoid duplicate SPF records.

DNS Caching

  • Local Cache: Your computer remembers DNS info to speed up future requests.
  • ISP Cache: Your internet service provider might store DNS info for faster access.
  • DNS resolver cache: Recursive DNS resolvers save record answers according to their TTL (time to live). An authoritative DNS server holds the published records and answers queries for its zone.

DNS Propagation

DNS updates are published at the authoritative DNS service, but cached answers elsewhere can remain until their TTL expires. Many changes become visible quickly; some take longer depending on caching, previous TTL values and the type of change. Check both the authoritative answer and the resolver you are testing before assuming an update has failed.


Conclusion

DNS helps convert website names into IP addresses, making it possible to access websites easily.

Before changing hosting or email providers, learn how to check your existing DNS records.

Which DNS records should you check before moving hosting?

The A and AAAA records normally direct a hostname to IPv4 and IPv6 addresses. CNAME records alias one name to another where permitted, while MX records route incoming email. TXT records often carry SPF, DKIM, DMARC and domain verification details. NS records indicate delegated nameservers.

A website move can require a change to an A record without changing MX records. Replacing nameservers is a wider change because the new DNS zone must contain every necessary record. Follow the DNS checklist before switching.

Leave a comment