DNS Record Types Explained
DNS records are the instructions stored in a zone that tell the internet where to find your domain's services. The most common types are A and AAAA (name to IP), CNAME (alias), MX (mail), TXT (text, including SPF/DKIM/DMARC), NS (nameservers), SOA (zone authority), SRV (service location), CAA (which CAs may issue certificates) and PTR (reverse DNS). Each one is explained below with a real example value.
Quick reference table
| Record | Purpose | Example value |
|---|---|---|
| A | Maps a name to an IPv4 address | 93.184.216.34 |
| AAAA | Maps a name to an IPv6 address | 2606:2800:220:1:248:1893:25c8:1946 |
| CNAME | Alias of one name to another name | www -> example.com. |
| MX | Mail exchange host + priority | 10 mail.example.com. |
| TXT | Arbitrary text (SPF, DKIM, DMARC, verification) | "v=spf1 include:_spf.google.com ~all" |
| NS | Delegates a zone to authoritative nameservers | ns1.example.net. |
| SOA | Start of authority: zone metadata + serial | ns1 hostmaster 2024010101 ... |
| SRV | Locates a service: priority, weight, port, target | 10 5 5060 sip.example.com. |
| CAA | Which certificate authorities may issue certs | 0 issue "letsencrypt.org" |
| PTR | Reverse DNS: IP back to a hostname | mail.example.com. |
A and AAAA - address records
An A record maps a hostname to a 32-bit IPv4 address; an AAAA record does the same for a 128-bit IPv6 address (the name comes from it being four times the size of an A record). These are the records that actually point a browser at a server. A name can have several A/AAAA records for round-robin load distribution. Use both when your host is reachable over IPv4 and IPv6.
Example: example.com. 3600 IN A 93.184.216.34
CNAME - canonical name (alias)
A CNAME makes one name an alias for another. When a resolver hits a CNAME it restarts the lookup at the target name. The key rule (RFC 1034): a name that has a CNAME must have no other records, so you cannot put a CNAME at the zone apex where NS and SOA already exist. For apex aliasing, providers offer ALIAS/ANAME records that flatten to A/AAAA at query time.
Example: www.example.com. 3600 IN CNAME example.com.
MX - mail exchange
MX records tell other mail servers where to deliver email for your domain. Each record has a preference number; lower is preferred, and higher values act as fallbacks. An MX target must be a hostname with an A/AAAA record - never an IP address and never a CNAME.
Example: example.com. 3600 IN MX 10 aspmx.l.google.com.
TXT - text records
TXT holds free-form text and is the workhorse for email authentication and
ownership proofs. SPF lives in a TXT at the domain apex, DMARC in a TXT at
_dmarc.example.com, and DKIM public keys in a TXT at a selector such as
selector1._domainkey.example.com. A single string is capped at 255 characters,
so long keys are split into multiple quoted strings that are concatenated.
Example: example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
NS - nameserver delegation
NS records list the authoritative nameservers for a zone. They appear both in the parent zone (the delegation) and inside the zone itself. Mismatched or stale NS records are a frequent cause of intermittent resolution failures, because some resolvers may query a server that no longer holds the zone.
Example: example.com. 86400 IN NS ns1.example.net.
SOA - start of authority
Every zone has exactly one SOA record holding its administrative metadata:
the primary nameserver, the responsible party's email (with the @ written as a
dot), the serial number that secondaries compare to detect changes, and the
refresh, retry, expire and minimum (negative-cache) timers. Bumping the serial is what
signals secondary servers to pull an updated zone.
Example: ns1.example.net. hostmaster.example.com. 2024010101 7200 3600 1209600 3600
SRV - service location
SRV records advertise the host and port for a specific service, named as
_service._proto.name (e.g. _sip._tcp.example.com). The value
carries priority, weight, port and target. They are widely used by SIP/VoIP, XMPP,
Microsoft Active Directory and Minecraft, among others.
Example: _sip._tcp.example.com. 3600 IN SRV 10 60 5060 sipserver.example.com.
CAA - certificate authority authorization
CAA records (RFC 8659) state which certificate authorities are allowed to
issue certificates for your domain. CAs are required to check CAA before issuance, so a
stray or wrong CAA record can block legitimate certificate renewals. The iodef
tag lets you supply a contact for reporting policy violations.
Example: example.com. 3600 IN CAA 0 issue "letsencrypt.org"
PTR - reverse DNS
A PTR record maps an IP address back to a hostname - the reverse of
an A record. It lives in the in-addr.arpa (IPv4) or ip6.arpa
(IPv6) zone and is normally managed by the owner of the IP block, such as your hosting
provider or ISP. Receiving mail servers often require a sending IP's PTR to match its
forward record (forward-confirmed reverse DNS) before accepting mail.
Example: 34.216.184.93.in-addr.arpa. 3600 IN PTR mail.example.com.
Related tools
- DNS Lookup - query any record type for a domain.
- DNS A Lookup
- DNS MX Lookup
- DNS TXT Lookup
- DNS NS Lookup
- DNS SOA Lookup
- SRV Record Tool
- Reverse DNS Lookup
Frequently asked questions
What is the difference between an A record and a CNAME?
An A record points a name directly to an IPv4 address (e.g. example.com -> 192.0.2.1). A CNAME points one name to another name (an alias), and the resolver then looks up the target. You cannot place a CNAME at the zone apex (the bare domain) alongside other records like MX or NS, which is why providers offer ALIAS/ANAME flattening instead.
Why do MX records have a priority number?
The number is a preference value: lower wins. Mail is delivered to the lowest-preference reachable host first, with higher-numbered hosts acting as backups. Two records with the same value share load. For example "10 mail1.example.com" is tried before "20 mail2.example.com".
Can a domain have more than one TXT record?
Yes. A name can hold many TXT records, which is normal: one for SPF, others for domain verification tokens, DKIM keys (on selector subdomains), and DMARC (on _dmarc). However a domain should publish only one SPF record (one "v=spf1" string) to remain valid.
What is a PTR record used for?
A PTR (pointer) record maps an IP address back to a hostname - reverse DNS. It lives in the special in-addr.arpa (IPv4) or ip6.arpa (IPv6) zones and is usually controlled by whoever owns the IP block, not the domain owner. Mail servers commonly check that a sending IP has a matching forward and reverse record (FCrDNS) as an anti-spam signal.
What does the TTL on a record mean?
TTL (time to live) is how long, in seconds, a resolver may cache the answer before asking again. A low TTL (e.g. 300) makes changes propagate quickly but increases query load; a high TTL (e.g. 86400) caches longer and is cheaper but slows changes. Lower the TTL before a planned migration, then raise it again afterward.
How this tool works: This tool runs in your browser and on our server in real time. Depending on the tool, results are computed directly from the input you provide or retrieved from live, authoritative data sources at the moment you run a lookup. We do not sell your data, and your lookups are kept private — any history shown here is stored only on your device.