DNS Record Types Explained
DNS is the internet's phone book: it turns a name like example.com into the addresses and settings computers need. The entries in that phone book are DNS records, and each record type answers a different question. Mixing them up is a classic cause of broken websites and lost email.
This guide explains the seven record types you will meet most often, with examples you can recognise in a DNS panel.
Anatomy of a DNS Record
Every record has roughly the same parts:
- Name: the host the record applies to (
example.com,www,mail). - Type: A, MX, TXT and so on.
- Value: the data. What it contains depends on the type.
- TTL: time to live, in seconds. How long resolvers may cache the answer.
A Record: Name to IPv4
The A record points a hostname to an IPv4 address.
example.com. 300 IN A 93.184.216.34
This is what makes your website reachable. You can have several A records for one name, which spreads traffic across servers (round-robin).
AAAA Record: Name to IPv6
The same job as A, but for 128-bit IPv6 addresses.
example.com. 300 IN AAAA 2606:2800:220:1:248:1893:25c8:1946
If a site has both, IPv6-capable visitors may use the AAAA record. A wrong AAAA record is a common cause of "works for some people, not others".
CNAME Record: Alias to Another Name
A CNAME says "this name is an alias of that name".
www.example.com. 3600 IN CNAME example.com.
Resolvers then look up the target. Rules to remember: a name with a CNAME cannot have other record types, and CNAMEs aren't allowed at the zone apex (example.com itself), which is why some DNS providers offer proprietary alias or flattening features.
MX Record: Where Email Goes
MX records name the mail servers for your domain, with a priority.
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
Lower priority numbers are tried first. An MX must point to a hostname, which must itself resolve through an A or AAAA record, and not to a CNAME. If email to your domain bounces, check MX first.
TXT Record: Free-Form Text
TXT records carry text that other systems read. The most common uses:
- SPF: lists servers allowed to send mail for the domain, e.g.
v=spf1 include:_spf.example.net ~all. - DKIM: publishes a public key to verify signed email.
- DMARC: a policy at
_dmarc.example.comfor handling messages that fail checks. - Verification: proving you own a domain to a third-party service.
A domain should have only one SPF record. Two SPF TXT records break SPF validation.
NS Record: Who Answers for the Zone
NS records list the authoritative name servers for a domain.
example.com. 86400 IN NS ns1.dnsprovider.net.
These are the servers that hold the real answers. Changing your NS records at your registrar moves DNS hosting to a different provider.
SOA Record: Zone Housekeeping
The Start of Authority record exists once per zone and holds administrative data: the primary name server, the admin contact, a serial number that changes with every update, and timers for refresh, retry, expiry, and negative-caching. You rarely edit it by hand, but it is handy for checking whether secondary servers have the latest version via the serial.
Quick Reference
One more type worth knowing: PTR records go the other way, from an IP to a name, and are used for reverse DNS. Check them with the Reverse DNS Lookup.
How to Look Up a Domain's DNS Records
- Open the DNS Lookup tool.
- Enter a domain such as
example.com. - Pick a record type (A, AAAA, MX, TXT, NS, CNAME or SOA).
- Read the values and TTL in the result.
Queries go out over DNS-over-HTTPS, and there is no signup. It is the quickest way to confirm a record exists after you add it.
Look Up DNS Records βWhen a Change Doesn't Show Up
If you just edited a record and still see the old value, you are probably looking at cached data. Resolvers keep an answer until its TTL runs out. Use the DNS Propagation Checker to compare answers from different places, and the TTL Calculator to convert TTL seconds into human-readable time. Lower the TTL a day ahead of a planned migration and the switch will be quicker.
Look Up Your Own Domain
Run your domain through the DNS Lookup tool and compare each record with what you expect. It's free, with no account needed.