DNSDomain Name System
DNS (the Domain Name System) is the internet’s distributed directory: it translates human-readable names like example.com into the IP addresses machines actually connect to. Defined in RFC 1034 and RFC 1035, it is also where almost every email control lives: your MX, SPF, DKIM, and DMARC records are all DNS entries.
- Translates domain names into IP addresses through a hierarchy of name servers
- Holds every email authentication record: MX, SPF, DKIM, and DMARC
-
Answers are cached for a
TTL(time to live), so changes are not instant - A single wrong or missing record can silently break mail delivery
53
MX, TXT, A, AAAA, PTR
TTL in seconds
How a DNS lookup works
DNS is a hierarchy. At the top sit the root servers, below them the top-level domain (TLD) servers for .com, .org, and the rest, and below those the authoritative name servers that actually hold your domain’s records. When a program needs the IP for mail.example.com, a recursive resolver (usually run by your ISP or a service like 8.8.8.8) walks that chain on its behalf and returns the answer.
To keep the system fast, every answer carries a TTL, a time-to-live in seconds that tells resolvers how long they may cache it before asking again. That cache is why a DNS change is never instant: a record with a one-hour TTL can keep serving the old value for up to an hour after you edit it. Most lookups travel over UDP port 53, falling back to TCP for large responses.
The record types email depends on
A DNS zone is a list of resource records, each a hostname, a TTL, a type, and a value. Email leans on a specific handful:
MX: which mail servers accept mail for the domain, and in what order. See MX record.A/AAAA: map a mail-server hostname to an IPv4 or IPv6 address so other servers can connect.TXT: holds your SPF policy and your DMARC record; DKIM keys live in a TXT record too.PTR: the reverse record that maps a sending IP back to a hostname. See PTR record.
A standard record reads left to right: hostname, TTL, class, type, value.
example.com. 3600 IN MX 10 mail.example.com.
mail.example.com. 3600 IN A 203.0.113.10
example.com. 3600 IN TXT "v=spf1 ip4:203.0.113.10 -all"
_dmarc.example.com. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"
Why DNS is the foundation of deliverability
Receiving mail servers read your DNS before they ever look at your message. They resolve your MX to know where to deliver, check your SPF and DMARC TXT records to authenticate you, and run a reverse DNS lookup on your sending IP to confirm it has a matching PTR record. Since February 2024, Google and Yahoo require every sending IP to have valid, matching forward and reverse DNS before they will accept bulk mail.
Because so much hinges on these records, a quiet DNS mistake is one of the most common causes of mail landing in spam: a TXT record with a typo, an SPF entry that forgets your new sending service, or a missing PTR. None of them throw an obvious error; the mail just quietly stops reaching the inbox. Our DNS records for email guide walks through getting each one right.
How a DNS lookup resolves a name
mail.example.com.com servers, then the domain’s authoritative name serverTTLThe DNS records email cares about
| MX | TXT | A / AAAA | PTR | |
|---|---|---|---|---|
| What it does | Names mail servers | Holds SPF / DMARC | Hostname to IP | IP to hostname |
| Lives in | Forward zone | Forward zone | Forward zone | Reverse zone |
| Email role | Routing | Authentication | Connecting | Reverse DNS / FCrDNS |
By the numbers
Common mistakes
TTL. If you edit a record with a long TTL, the old value can keep serving for hours. Lower the TTL before a planned change, then raise it again afterward.Frequently asked questions
MX records tell other servers where to deliver mail, your TXT records hold SPF and DMARC, DKIM keys live in DNS, and your sending IP needs a matching PTR record for reverse DNS. If any of these is wrong or missing, mail can fail authentication or be rejected outright.TTL (time to live) that tells resolvers how long to keep the old answer. Until that timer expires, resolvers around the world may keep serving the previous value, so changes can take minutes to hours to fully propagate.8.8.8.8 and Cloudflare’s 1.1.1.1.