The Domain Name System (DNS) is often called the internet’s address book. When you type a domain name, DNS finds the IP address of the server, the mail servers that accept email for the domain, the keys that prove an email is genuine and much more. That information is stored as DNS records. This guide explains each common record type with real examples – and you can look up any of them with our DNS lookup tool.
How a DNS lookup works
When your browser needs www.example.com, it asks a recursive resolver – usually run by your internet provider, or a public service like Cloudflare (1.1.1.1), Google (8.8.8.8) or Quad9 (9.9.9.9). If the resolver does not have the answer cached, it asks the root servers which servers handle .com, then asks those which name servers are authoritative for example.com, and finally asks the authoritative server for the record itself. The answer is cached for the record’s TTL (time to live), so the next lookup is instant.
Anatomy of a record
www.example.com. 3600 IN A 203.0.113.10
name TTL class type value
The TTL is in seconds – here, one hour. The class is almost always IN (internet).
The common record types
A – IPv4 address
Maps a name to an IPv4 address. This is what makes a website load.
example.com. A 203.0.113.10
A name can have several A records; clients pick one, which spreads load and provides redundancy.
AAAA – IPv6 address
The same as an A record, but for an IPv6 address. Browsers on IPv6 connections use it when available.
example.com. AAAA 2001:db8::10
CNAME – alias
Points one name at another name. The resolver then looks up the target.
www.example.com. CNAME example.com.
shop.example.com. CNAME shops.myplatform.com.
Rules: a name with a CNAME cannot have any other records, and you cannot put a CNAME on the root (“apex”) of a domain. Many DNS providers offer an ALIAS, ANAME or “CNAME flattening” feature to work around this.
MX – mail exchanger
Lists the servers that accept email for the domain, with a priority number. Lower numbers are tried first.
example.com. MX 10 mx1.mailprovider.com.
example.com. MX 20 mx2.mailprovider.com.
An MX record must point to a hostname that has an A or AAAA record – never directly to an IP address or a CNAME.
TXT – text
Holds free-form text. Today it is mostly used for email security and domain verification:
- SPF lists which servers may send email for your domain:
v=spf1 include:_spf.google.com ~all. A domain must have only one SPF record, and SPF evaluation is limited to 10 DNS lookups. - DKIM publishes a public key at
selector._domainkey.example.comso receivers can verify email signatures. - DMARC at
_dmarc.example.comtells receivers what to do when SPF and DKIM fail and where to send reports:v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com. - Verification tokens for services like Google Search Console or Microsoft 365.
NS – name server
Says which servers are authoritative for the domain. These are set at your registrar; changing them moves your whole DNS to a different provider.
example.com. NS ns1.dnsprovider.com.
example.com. NS ns2.dnsprovider.com.
SOA – start of authority
One per zone. It names the primary name server and the administrator’s email (with the @ replaced by a dot), plus a serial number and timers used by secondary servers. Its last value is also the TTL for “this name does not exist” answers, which is why a newly created record can take a while to appear if someone looked it up before it existed.
CAA – certification authority authorisation
Lists which certificate authorities may issue SSL/TLS certificates for the domain.
example.com. CAA 0 issue "letsencrypt.org"
If you have CAA records and switch certificate providers without updating them, certificate issuance will fail.
SRV – service
Locates services such as SIP phones, XMPP chat or Minecraft servers, including the port: _minecraft._tcp.example.com. SRV 0 5 25565 mc.example.com. (priority, weight, port, target).
PTR – pointer (reverse DNS)
Maps an IP address back to a name. PTR records live in special zones (in-addr.arpa for IPv4, ip6.arpa for IPv6) controlled by whoever owns the IP address, not by your domain’s DNS. They matter most for mail servers. Check yours with our reverse DNS lookup.
Common mistakes
- Two SPF records. Merge them into one; with two, SPF fails.
- Forgetting the www name.
example.comandwww.example.comare separate names and both need records. - CNAME on the root. Use your provider’s ALIAS/flattening feature instead.
- MX pointing to a CNAME or IP. Point it to a hostname with an A/AAAA record.
- Changing records with a long TTL. Lower the TTL to 300 seconds a day before a planned migration, then raise it again afterwards.
- Editing DNS at the wrong provider. If your registrar’s NS records point elsewhere, edits in the registrar’s DNS panel have no effect. Check the NS records first.
- Letting the domain expire. Use WHOIS to check the expiry date and enable auto-renew.
Checking your records
Use our DNS lookup to query any record type through Cloudflare, Google or Quad9. Comparing resolvers is a quick way to see whether a recent change has reached the big public resolvers. From a terminal you can also use nslookup -type=MX example.com (Windows, macOS, Linux) or dig example.com MX (macOS, Linux).