by Tommy N. Updated Apr 23, 2026
Every time you type a web address, send an email, or connect to an online service, DNS record types are working behind the scenes to route your request to the right destination. Understanding DNS record types — A, AAAA, MX, CNAME, and TXT — gives you real control over how your domain behaves on the internet and helps you diagnose connectivity problems fast.
In this guide you will learn exactly what each DNS record type does, when to use it, and how to read or update your own records. Whether you are setting up a new domain, troubleshooting email delivery, or simply trying to understand how the internet works, knowing your DNS records is a foundational skill — just like knowing what an IP address is or understanding how to change DNS on your router.
DNS stands for Domain Name System, and it functions as the phone book of the internet. When you type example.com into a browser, your computer queries a DNS server to find the numeric IP address that corresponds to that name. Without DNS, every user would need to memorize strings of numbers instead of human-friendly domain names. DNS records are the individual entries in that phone book, and each type serves a distinct purpose.
A DNS zone file is a collection of these records, all tied to a specific domain. Each record contains at least three pieces of information: the name (which subdomain or root domain it applies to), the type (A, AAAA, MX, and so on), and the value (the data the record points to). There is also a TTL, or Time To Live, measured in seconds, which tells resolvers how long to cache the record before asking for a fresh copy.
When you make a change to a DNS record — say, pointing your domain to a new server — the change does not take effect instantly everywhere. Resolvers around the world cache the old value until the TTL expires. This propagation delay can range from a few minutes to 48 hours, depending on how the TTL was set before the change. Lowering your TTL to 300 seconds (5 minutes) before making planned changes is standard practice for minimizing downtime.
Each record type was designed by the IETF to solve a specific routing or verification problem. Using the wrong record type for a job — for example, pointing an email server with a CNAME instead of an MX record — can cause silent failures that are surprisingly hard to debug. Understanding what each type is designed for eliminates an entire class of configuration mistakes.
Here is a practical walkthrough of the five most important DNS record types, what they look like, and when you will encounter them.
example.com. 3600 IN A 93.184.216.34 tells resolvers that example.com lives at that specific IPv4 address. This is the most common record type and the one most web servers rely on to receive incoming traffic.example.com. 3600 IN AAAA 2606:2800:220:1:248:1893:25c8:1946. As IPv4 addresses become scarce, AAAA records are increasingly important; modern operating systems will prefer an AAAA record over an A record when both exist.example.com. 3600 IN MX 10 mail.example.com. means: send email for this domain to mail.example.com with a priority of 10. Lower numbers mean higher priority, which is how you set up primary and backup mail servers.www.example.com. 3600 IN CNAME example.com. makes www.example.com resolve to whatever example.com currently points to. CNAMEs are convenient for subdomains but cannot be used at the root (apex) of a domain alongside other records.example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all".The table below summarizes the key differences between the five DNS record types so you can choose the right one at a glance.
| Record Type | Purpose | Value Format | Typical TTL |
|---|---|---|---|
| A | Maps hostname to IPv4 address | xxx.xxx.xxx.xxx (e.g., 93.184.216.34) | 3600 s |
| AAAA | Maps hostname to IPv6 address | Eight groups of hex digits (e.g., 2606:2800::1) | 3600 s |
| MX | Routes email to mail servers | Priority + mail server hostname | 3600 s |
| CNAME | Alias from one hostname to another | Fully qualified domain name | 1800 s |
| TXT | Stores text for verification & email auth | Quoted string (up to 255 chars per string) | 3600 s |
Before editing any DNS record, use our free DNS Lookup tool to see the current live values for your domain. This gives you a baseline to compare against after your changes propagate and helps you catch typos or misconfigurations immediately.
Even a small mistake in a DNS record — a missing trailing dot, an extra space, or the wrong record type — can take your website offline or break email delivery for your entire domain. The good news is that most DNS problems follow predictable patterns and can be resolved systematically.
Email failures are often traced to misconfigured MX or TXT records. If your outgoing email is landing in spam or being rejected outright, check that your SPF, DKIM, and DMARC TXT records are present and correctly formatted. SPF records must not have more than ten DNS lookups (the include mechanism counts), and you should have only one SPF record per domain — multiple SPF TXT records cause evaluation failures. You can verify your domain's current DNS state any time with the DNS Lookup tool.
Website downtime after a migration is almost always a DNS propagation issue. If your site loads on some networks but not others, the old cached A or AAAA record is still being served by certain resolvers. Using a low TTL (300 seconds) before migrating — and waiting at least that long after the migration — minimizes the window of inconsistency. After propagation completes, raise your TTL back to 3600 seconds or higher to reduce query load on your nameservers.
mail.example.com.) to prevent the zone name from being appended automaticallyPro Tip: Run a DNS lookup on your own domain regularly — especially after your DNS provider performs maintenance — using our DNS Lookup tool. Unexpected record changes or TTL resets are occasionally introduced by provider-side migrations and are easy to miss until something breaks.
An A record maps a hostname directly to an IPv4 address, while a CNAME record creates an alias that points to another hostname, which is then resolved to an IP. A records are faster since they require one fewer DNS lookup, and they are the only option at the domain apex (root domain). CNAMEs are best used for subdomains like www or blog where you want them to automatically follow changes to the target hostname.
Yes, and for most modern websites you should. Having both records enables dual-stack connectivity: IPv6-capable clients will use the AAAA record, while older clients fall back to the A record automatically. This is handled transparently by the operating system through a mechanism called Happy Eyeballs. You can verify both records exist for your domain using our DNS Lookup tool.
Sender Policy Framework (SPF) is an email authentication standard stored as a TXT record that lists which mail servers are authorized to send email on behalf of your domain. When a receiving mail server gets a message claiming to be from your domain, it checks the SPF TXT record to verify the sending server is on the approved list. Without SPF, anyone can spoof your domain in email headers, and many servers will treat your legitimate messages as spam.
DNS propagation time depends on the TTL value set on the record before the change. If the TTL was 3600 seconds (1 hour), resolvers that cached the old value can take up to an hour to see the update. Global propagation across all resolvers can take up to 48 hours in rare cases, though most changes are visible within a few hours. Lowering your TTL to 300 seconds at least 24 hours before a planned change dramatically reduces this window.
The priority (or preference) value in an MX record tells sending mail servers which mail exchanger to try first. Lower numbers have higher priority, so a server with priority 10 will be tried before one with priority 20. If the primary mail server (priority 10) is unreachable, the sending server will fall back to the next lowest priority. Most small domains only need one MX record, but adding a backup with a higher priority number provides resilience.
RFC 1912 and RFC 2181 prohibit a CNAME record from sharing a name with any other record type. At the domain apex (e.g., example.com without a subdomain), you must have SOA and NS records, which means a CNAME there would conflict. Some DNS providers offer a proprietary ALIAS or ANAME record type that behaves like a CNAME but resolves transparently at the apex; this is not a standard DNS record type, so availability varies by provider.
For authoritative networking standards and specifications, refer to the Internet Assigned Numbers Authority (IANA) or IETF RFC documents.
![]() |
![]() |
![]() |
![]() |
About Tommy N.
Tommy is the founder of RouterHax and a network engineer with over ten years of experience in home and enterprise networking. He has configured and troubleshot networks ranging from simple home setups to multi-site enterprise deployments, with deep hands-on experience in router configuration, WiFi optimization, and network security. At RouterHax, he oversees editorial direction and covers home networking guides, mesh WiFi system reviews, and practical troubleshooting resources for everyday users.
Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.
Once done, hit any button as below
![]() |
![]() |
![]() |
![]() |