DNS Record Types — Reference
DNS record types reference — A, AAAA, CNAME, MX, NS, SOA, TXT, and PTR explained. How to do a DNS lookup with nslookup and how DNS propagation works.
The Domain Name System (DNS) is the internet's address book — it translates human-readable domain names into the numerical IP addresses computers use to communicate. Every website visit, email delivery, and API call depends on DNS to resolve names to addresses.
Each domain is described by a set of resource records, each with a specific type and purpose. Select a record type below to see a full explanation, format, and common uses.
What is a DNS record?
A DNS record is an entry in a domain's zone that maps a name to data. Every DNS record has five fields: a name (the hostname being looked up), a TTL (how long resolvers should cache it), a class (always IN for internet records), a type (A, MX, CNAME, etc.), and data (an IP address, hostname, text string, or other structured value).
When you visit a URL, your browser asks a DNS resolver to find the A or AAAA record for that domain. The result is cached for the record's TTL — which is why DNS changes can take time to reach every resolver worldwide.
DNS record types — complete list
| Type | Full name | What it stores | Common use |
|---|---|---|---|
| A | Address | IPv4 address | Maps a hostname to a server's IPv4 address |
| AAAA | IPv6 Address | IPv6 address | Maps a hostname to a server's IPv6 address |
| CNAME | Canonical Name | Another hostname | Alias — www.example.com → example.com |
| MX | Mail Exchange | Mail server hostname + priority | Routes email to the correct mail server |
| TXT | Text | Free-form text string | SPF, DKIM, DMARC, domain verification |
| NS | Nameserver | Nameserver hostname | Delegates a zone to authoritative nameservers |
| SOA | Start of Authority | Zone metadata | Serial number, refresh intervals, admin contact |
| PTR | Pointer | Hostname | Reverse DNS — maps an IP address back to a hostname |
| SRV | Service | Host, port, priority, weight | Service location for SIP, XMPP, Teams, and other protocols |
| CAA | Certification Authority Authorization | CA name + policy | Restricts which CAs can issue SSL certificates for a domain |
How to do a DNS lookup — nslookup and dig
nslookup is the standard command-line tool for querying DNS records. It's available on Windows, macOS, and Linux without installation:
# Look up the A record for a domain
nslookup example.com
# Look up MX records (mail servers)
nslookup -type=MX example.com
# Look up TXT records (SPF, DKIM)
nslookup -type=TXT example.com
# Query a specific DNS server (e.g. Google's 8.8.8.8)
nslookup example.com 8.8.8.8
On Linux and macOS, dig is more detailed:
dig example.com
dig example.com MX
dig @8.8.8.8 example.com A +short
For web-based DNS lookup, MXToolbox (mxtoolbox.com) is widely used — it checks MX records, blacklists, SMTP connectivity, and general DNS records. WhatsmyDNS.net queries authoritative nameservers from multiple global locations, which is useful for checking DNS propagation.
DNS propagation
When you update a DNS record, the change doesn't take effect instantly worldwide. Resolvers cache records for the duration specified in the record's TTL (time-to-live). A record with a 3,600-second TTL may take up to an hour to refresh for users whose resolvers cached the old value.
Full global propagation typically completes within 24–48 hours, though in practice most resolvers pick up changes within minutes for low-TTL records. DNS propagation checkers like WhatsmyDNS.net and the nslookup/dig commands can show you which regions have the new value and which are still serving the old one.
To speed up a planned change: lower the TTL to 300 seconds (5 minutes) at least an hour before making the change. After switching, restore the TTL to a sensible value (3,600–86,400 seconds depending on how often the record changes).
Frequently asked questions
How do I use nslookup to check DNS records?
Run nslookup <domain> in your terminal or command prompt to look up A records. Add -type=MX for mail records, -type=TXT for SPF/DKIM/verification records, or -type=CNAME for aliases. To query a specific resolver, append its IP: nslookup example.com 8.8.8.8.
What does MXToolbox check?
MXToolbox is a web-based DNS tool that specialises in email-related DNS records — MX records, SPF, DKIM, DMARC, and SMTP connectivity. It also offers blacklist checking to see whether a mail server IP has been flagged by spam databases. It's useful for diagnosing email delivery problems.
How long does DNS propagation take?
DNS propagation depends on the record's TTL. A TTL of 3,600 seconds means resolvers can cache the old value for up to 1 hour. In practice, many resolvers refresh more frequently. Full propagation — reaching resolvers worldwide — typically takes a few minutes to 24 hours, rarely longer.
What is the difference between a DNS lookup and a DNS checker?
A DNS lookup queries the current DNS records for a domain — it shows what a domain currently resolves to. A DNS checker or propagation checker queries multiple global resolvers simultaneously to show whether a recent DNS change has propagated to different locations. WhatsmyDNS.net is a common example of the latter.