Back to Glossary
Email Protocols

DNS Record

A database entry that provides information about a domain, essential for email authentication and routing.

Definition

DNS (Domain Name System) records are entries in the domain name system that provide information about a domain. For email, critical DNS records include MX (mail exchange) for routing, TXT records for SPF and DKIM authentication, and CNAME records for domain verification. Proper DNS configuration is essential for email deliverability.

Why It Matters

Incorrect or missing DNS records cause authentication failures, delivery problems, and security vulnerabilities. Email providers check your DNS records to verify you are authorized to send from your domain. Without proper records, your emails may be rejected or marked as spam.

How It Works

When a server receives your email, it queries DNS for your domain's records. It checks MX records to route mail, SPF records to verify sending authorization, and DKIM records to verify signatures. These lookups happen in milliseconds and affect whether your email is accepted.

Example

Common email-related DNS records:

MX Record: Routes email to your mail server Priority 10: mail.example.com

SPF Record (TXT): Lists authorized senders v=spf1 include:_spf.google.com include:sendgrid.net ~all

DKIM Record (TXT): Contains public key for signature verification selector._domainkey.example.com v=DKIM1; k=rsa; p=[public key]

DMARC Record (TXT): Authentication policy _dmarc.example.com v=DMARC1; p=quarantine; rua=mailto:reports@example.com

Best Practices

  • 1Verify all email-related DNS records are correctly configured
  • 2Use DNS checking tools to validate your setup
  • 3Keep track of TTL (time-to-live) values when making changes
  • 4Document your DNS configuration for troubleshooting
  • 5Update DNS when changing email providers or adding new services

Email DNS Record Table

Record type Email purpose Example use
MX Routes inbound mail for the domain Direct mail to Google Workspace or another mailbox provider
TXT Stores SPF, DKIM, DMARC, and verification values Publish authorized senders or authentication policy
CNAME Points one hostname to another Delegate tracking or DKIM hostnames to an email provider
A or AAAA Maps hostnames to IP addresses Used for mail server hostnames or custom tracking domains

DNS Change Timing Table

Situation Recommended timing Why
Adding a new sender At least 24 hours before launch Allows DNS caches to refresh before real volume
Rotating DKIM keys Publish new key before switching signing Prevents receivers from missing the verification key
Changing MX records During a low-risk window Mail routing changes can interrupt inbound mail
Lowering TTL Before a planned migration Makes later changes propagate faster

DNS Troubleshooting Table

Problem Likely cause Check
SPF fails Missing include or too many DNS lookups SPF record syntax and lookup count
DKIM fails Wrong selector or truncated public key Full TXT value at selector hostname
DMARC reports missing Incorrect rua address or malformed record _dmarc TXT record and reporting mailbox
Provider cannot verify domain Record placed on wrong hostname Exact host/name field in DNS manager

Frequently Asked Questions