How to Plan a DNS TTL Change Before an MX or SPF Move
Lower the record's TTL no later than the change time minus its current TTL, make the change, then raise the TTL again. Resolvers that cached the old record just before you lowered the TTL keep it for up to the old TTL, so the shorter value has to be live for one full old TTL first. The DNS TTL change planner works out the times from the change time, the current TTL and the shorter TTL.
The two formulas
- Lower-by time = change time minus current TTL. Publish the shorter TTL by then, so every copy of the old long TTL has expired by the change.
- Seen-by time = change time plus the lowered TTL. After this, resolvers that follow TTLs should be using the new record.
Without lowering it first, the same change takes up to the current TTL to be seen: change time plus current TTL.
For example, with a current TTL of 86400 seconds (24 hours), a change planned for 14:00 UTC on Friday and a lowered TTL of 300 seconds (5 minutes), publish the 300-second TTL by 14:00 UTC on Thursday. After the change, the old record should be gone from compliant resolvers by 14:05 UTC. Without the early step, it could have lingered until 14:00 UTC on Saturday.
Step 1: find the current TTL
Ask for the record and read the second column.
dig example.com MX
Each answer line shows the name, then the TTL in seconds. A caching resolver shows the time left, which counts down, so query the domain's own name server (dig @ns1.yourdns.com example.com MX) to see the value as published. On Windows, nslookup -debug -type=mx example.com prints a ttl field.
Step 2: enter the times in the planner
Enter the change date and time in UTC, pick the current TTL and the shorter TTL you will switch to first. The planner returns the lower-by time, the seen-by time, what the seen-by time would have been without lowering, and when it is safe to raise the TTL again.
Step 3: make the change safely
- Lower the TTL by the time shown.
- At the change time, edit the MX, SPF or other record.
- Keep the old mail server running until the seen-by time passes, because some senders still reach it until their cache expires.
- Raise the TTL again afterwards so your DNS host serves fewer queries.
Check the new records with the MX lookup and the DNS propagation checker. Our guide to checking a new domain is ready to send email lists the other records to confirm.
Mind the negative TTL too
A resolver that asked for a name before it existed can cache "no such record". How long is set by the zone's SOA, as explained in looking up a domain's SOA record. That is why a brand-new record can look missing for a while even with a short TTL on everything else.
What this tool cannot do
- Times assume resolvers follow the TTL they were given. A few hold a record longer or shorter, and browsers and operating systems add their own caching.
- It does not read your DNS or know your current TTL.
- It does not check that the new record is correct.
Check the list before you send from the new setup
Mail routing changes are the time to check your list too. Upload your list on the verify page: the first 100 email checks are free with a Google sign-in, no card. Each address comes back valid, risky or invalid with a reason, and nothing is sent to anyone on the list. For larger or recurring lists, see bulk email verification, list cleaning and pricing.
Plan your change now
Open the DNS TTL change planner.
Common questions
When should I lower the TTL before changing an MX record?
At least one old TTL before the change. Lower-by time equals change time minus the current TTL.
How long until everyone sees the change?
After the change, the longest a resolver should still hold the old record is the lowered TTL. Seen-by time equals change time plus the lowered TTL.
How do I see a record's current TTL?
Run dig example.com MX and read the number in the second column of the answer. From a caching resolver it counts down, so ask the authoritative server for the full value.
When do I raise the TTL again?
Once the change is settled, after the seen-by time. A longer TTL means your DNS host serves fewer queries.
Does the planner read my DNS?
No. It does not know your current TTL and does not check that the new record is correct.
Check your list before you send
Real mailbox checks over SMTP, and nothing is sent to the address. Sign in with Google and your first 100 email checks are free, no card. Plans for bigger lists are on the pricing page.