New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Domains and DNSUpdated 26 Oct 2026

DNS TTL Settings for Email Records: Choosing Values for MX, SPF, DKIM, DMARC and PTR

How DNS TTL affects email: caching, propagation, migrations and outages. Recommended TTLs for MX, SPF, DKIM, DMARC, MTA-STS and PTR records, how to lower TTL before changes, negative caching and common mistakes.

TK
Written by Tomasz Kowalski
Infrastructure and Reliability Engineer
Reviewed by Mateus Oliveira
  • Published11 Jan 2025
  • Read time6 min
  • Length1,193 words
Share this guide

Every DNS record carries a time to live, or TTL, measured in seconds. It tells resolvers how long they may keep the answer before asking again. For web pages a long TTL is mostly a performance detail. For email it shapes how quickly a change takes effect, how long a mistake lingers and how well your mail survives a DNS outage. A wrongly set MX record with a 24-hour TTL stays wrong in many caches for a day; a very short TTL on all records raises query load and makes you more sensitive to resolver hiccups. This guide explains how caching works for email-related records, gives recommended TTLs for each record type, describes a safe procedure for migrations and explains negative caching, a frequent source of confusion. It builds on MX records, DNS records for email and workspace MX records.

Normal stateModerate TTLs (for example 1 to 4 hours) balance speed of change with resilience
Before a changeLower the TTL at least one old-TTL period in advance
After a changeRestore longer TTLs once the new setup is stable
Watch forNegative caching of missing records, resolver minimum TTLs and records in several places

How caching works for email

When a mail server wants to deliver to example.com, it asks a recursive resolver for the MX records. The resolver caches the answer for the TTL in the response. All later senders using that resolver get the cached answer until it expires. Different resolvers have different cache contents and expiry moments, so a change spreads gradually; there is no single moment when everyone sees the new value. The old TTL, not the new one, governs how long previous answers linger, which is why lowering the TTL only helps once the old TTL has elapsed. Mail transfer agents also remember failures and retry on their own schedule; see retry schedules.

Cache layerBehaviour
Recursive resolver (ISP, public DNS, enterprise)Caches answers for the TTL; some enforce a minimum or maximum TTL
Mail server local cacheMany MTAs run a local caching resolver; restart or flush if needed
Application or library cacheSome code caches lookups internally for the process lifetime
Negative cacheFailed lookups (NXDOMAIN, no data) are also cached, for the SOA minimum or negative TTL
Operating system cacheDesktops cache too; servers usually rely on a resolver
RecordTypical TTLReasoning
MX1 hour (3600) to 4 hours; 300 during a migrationGoverns where inbound mail goes; keep it short enough to repoint quickly in an outage
A/AAAA of mail hosts1 hour to 1 dayChanges with server replacement; keep consistent with MX TTL
SPF TXT1 hour to 4 hoursChanged when adding senders; mistakes should not linger
DKIM TXT or CNAME1 hour to 1 day; shorter during key rotation. See key rotationSelectors rarely change, but a new key must be visible quickly
DMARC TXT1 hour to 4 hours; shorter while tightening policyPolicy changes should take effect predictably. See DMARC policies
MTA-STS TXT (id) and policy fileShort TXT TTL (for example 5 to 60 minutes) and a controlled max_ageThe id signals changes. See MTA-STS
TLSA (DANE)1 hour to 1 day, longer than key rollover steps. See DANEMistakes can block delivery; plan rollovers carefully
PTR (reverse DNS)1 hour to 1 day; set by your IP provider. See FCrDNSOften not under your control
CNAME for tracking or return-path1 hour to 1 dayProvider-managed; check their recommendation
NS records and SOAPer registrar and DNS provider; typically 1 to 2 days for NSChanging name servers is the slowest change of all

These are starting points. Providers and platforms often prescribe a value, and some resolvers apply their own limits (many ignore TTLs below 30 to 60 seconds or cap them at a day or more). Very short TTLs such as 30 seconds mostly increase cost and fragility rather than speed.

A safe procedure for changing mail DNS

  1. Plan the cutover time and note the current TTL of every record you will change (for example MX at 86400).
  2. Lower the TTL to something like 300 seconds at least one old-TTL period before the change. If the old TTL is 24 hours, lower it two days ahead to be safe.
  3. Prepare the new destination fully first: mailboxes created, TLS certificate valid, SPF including the new senders, DKIM published, firewall open. Test by connecting directly to the new host. See reading an SMTP transcript.
  4. Make the change and verify with queries against the authoritative server first, then against several public resolvers.
  5. Keep the old system running for at least the old TTL plus a safety margin (a few days), forwarding or collecting mail that still arrives. See backup MX risks if considering a fallback.
  6. Monitor bounces, deferrals and the volume on old and new systems.
  7. Restore normal TTLs when everything is stable, and record the final values in the inventory.
# Ask the authoritative server directly (bypasses caches)
dig +norecurse MX example.com @ns1.example-dns.net

# Ask a public resolver and watch the remaining TTL count down
dig MX example.com @1.1.1.1
dig MX example.com @8.8.8.8

# Show only answers with TTLs
dig +noall +answer MX example.com

Negative caching

If a resolver looks up a record that does not exist, it caches that failure too, for a time defined by the minimum field of the zone's SOA record (limited by the SOA TTL). This matters when you publish a new DKIM selector, SPF record or DMARC record shortly after a sender or checker looked for it and found nothing: the "does not exist" answer can persist for the negative TTL, which is often an hour or more. Consequently a new record sometimes seems to work from one network and not from another. To reduce surprises, publish records before you start using them, keep the SOA negative TTL moderate (for example 300 to 3600 seconds) and do not test a record repeatedly from the same resolver before it is live.

Common mistakes

  • Lowering TTL at the moment of the change. It does nothing for answers already cached under the old TTL.
  • Leaving a very short TTL forever. It adds load and raises exposure to resolver outages. Raise it again after the change.
  • Setting a very long TTL on MX. A day or more makes recovery from a misconfiguration or server failure slow.
  • Forgetting related records. A new mail server needs updated A, PTR, SPF and certificates; each has its own TTL.
  • Changing name servers without copying all records. Missing DKIM, SPF or MX records on the new servers break mail the moment delegation changes.
  • Assuming propagation is instant on checker sites. Online tools query specific resolvers that may hold older answers.
  • Several TXT records for one purpose. A leftover old SPF record causes a permanent error regardless of TTL. See SPF errors.

DNS availability matters more than TTL

TTL controls how long answers live, but the bigger risk to email is the DNS service itself. Use at least two name servers on independent networks, preferably at a provider with an availability track record, and keep TTLs long enough that short outages are masked by caches. Some resolvers can serve stale answers during an outage, but you should not depend on it. If your zone is large or changes often, automate it with infrastructure as code and keep a tested copy of all mail-related records.

Verify your records after a change Check SPF, DKIM and DMARC for your domain.

Open the checker

References and further reading

Frequently asked questions

What TTL should I use for MX records?

Commonly one to four hours, lowered to about five minutes before a planned migration.

Why must I lower the TTL ahead of a change?

Resolvers cache answers for the old TTL, so a shorter value only helps after that period has passed.

What is negative caching?

Resolvers also cache that a record does not exist, so a newly published record may appear missing for a while.

Does a very low TTL speed up email changes?

Only to a point. Many resolvers enforce minimums, and very low values raise query load and fragility.

How do I check the TTL of a record?

Use dig and read the TTL column; query the authoritative server for the configured value.

Topics#dns#ttl#caching#mx#migration
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales