Cover: DNS TTL Explained: What to Set and When
November 29, 2026·10 min read·2,145 words·

DNS TTL Explained: What to Set and When

DNS TTL controls how long resolvers cache your records; this guide explains what value to use and how to lower it safely before a host or email move.

DNS TTL (time to live) is the number of seconds a resolver is allowed to cache a DNS record before it has to go back and ask the authoritative server again. A long TTL makes lookups faster and cheaper because resolvers keep answering from their own cache. A short TTL makes changes reach people faster because that cache expires sooner. Before you move a website or email to a new host, drop the TTL on the records you're about to change to around 300 seconds, and do it at least one full old-TTL period ahead of the move. Resolvers that already cached the record under the old TTL will keep serving that cached answer until the old TTL runs out, not until you flip the setting in your DNS panel.

What is DNS TTL, in plain terms?

Every record in DNS carries a TTL: a number that tells any resolver how many seconds it may keep that record in cache before it has to ask the authoritative nameserver again. RFC 1035 defines it as an unsigned 32-bit integer giving the time interval, in seconds, that a resource record may be cached before it should be discarded. A TTL of zero means the record may only be used for the single lookup in progress and must not be cached at all.

RFC 2181 tightens this: TTL is an unsigned integer from 0 up to 2,147,483,647, and any value with the top bit set is treated as zero. It also settles a key operational point: a TTL defines a maximum time to live, not a mandatory floor. A resolver can cap it lower. It can also drop the record early, but it cannot hold on to it longer than the number you set.

How do you read a TTL with dig?

Don't trust what your browser or ISP resolver returns, because it may already be cached. Query the authoritative server directly instead, because that is the server publishing the zone rather than a resolver repeating an earlier answer. Here is a real example, observed on 21 November 2026:

dig +noall +answer example.com A @a.iana-servers.net
example.com.  300  IN  A  23.192.228.80

That 300 is the TTL configured by the zone owner. Now compare it. The registry serves a separate value for the domain's delegation:

dig +noall +authority example.com NS @a.gtld-servers.net
example.com.  172800  IN  NS  hera.ns.cloudflare.com.

172800 seconds is two days, and it's set by the .com registry, not by you. That's why a nameserver change is the slowest kind of DNS change you can make: you don't control that TTL at all.

Now watch the countdown happen on a public resolver instead of the authority:

dig +noall +answer hostlist.io A @9.9.9.9
hostlist.io.  300  IN  A  104.26.5.77

(same query, about ten seconds later)
hostlist.io.  290  IN  A  104.26.5.77

The resolver reports the remaining time on its cached copy, which is why the number counts down. The authoritative server behaves differently. It always returns the full configured value because it does not cache: it is the source. Track a live change across multiple resolvers with HostList's DNS propagation checker rather than guessing from a single dig query.

What TTL should you use: 300 vs 3600 vs longer?

There is no single correct value. The right value depends on your zone's current state, and HostList's recommendation, matching AWS guidance for Route 53, is to keep TTLs high during steady state and drop them low only for migrations:

Record type / situationRecommended TTL
Stable A, AAAA, CNAME records, nothing changing soon3600 to 86400 seconds (one hour to one day)
Any record you're about to change (A, AAAA, CNAME, MX, TXT)300 seconds
MX records in steady state3600 seconds or more
Records behind Cloudflare's orange-cloud proxyFixed at 300 (Auto), not editable
TXT records for SPF, DKIM or domain verification3600 seconds

At 3600 seconds, a resolver that's already cached your record will keep serving the old answer for up to an hour after you change it. At 300 seconds, that window shrinks to five minutes. The trade-off is real: Google's own performance notes say lower TTLs mean more frequent lookups and more cache misses, and a cache miss costs a full resolution rather than an instant cached answer, Google Public DNS's performance documentation reports an average resolution time of 130 ms for name servers that respond, with total end-to-end time climbing to 300 to 400 ms once you count failures and retries. Running every record at 300 seconds forever just to feel safe is paying that cost permanently for no reason.

Why lower TTL before a migration, and how far ahead?

This is where migrations usually stumble. Admins drop the TTL on cutover morning and wonder why traffic still hits the old server for another day. Resolvers honour the TTL from when they fetched the record, not the new value you just saved. If your A record sat at 86400 seconds (one day) and a resolver resolved it six hours ago, it caches that old answer for the remaining eighteen hours, regardless of the lower setting now saved in your DNS panel.

Reduce the TTL to around 300 seconds at least one full cycle of the old TTL before cutting over. If the previous TTL was a day, drop it 24 to 48 hours in advance, not an hour before. Once that window passes, resolvers fetching your zone will have picked up the short TTL, allowing your cutover to take effect within minutes rather than a day. If you inherited the domain and aren't sure where it is hosted today, HostList's guide to finding out who is hosting a website covers that first step.

The migration runbook

This is the sequence HostList recommends for any host or email move, in order:

  1. Note the current TTLs on every record you'll touch: A, AAAA, CNAME for www, MX, and any TXT records used for SPF or domain verification. Read these from the authoritative server with dig, not from a resolver, since a resolver's answer is already a cached, decaying copy.
  2. Lower those records to 300 seconds at least one full old-TTL period before the move. If the old TTL was 86400 seconds, do this 24 to 48 hours ahead. Doing it an hour before the move does nothing for resolvers that cached the old value earlier that day.
  3. Create any new hostnames before anyone looks them up. If a mail server, subdomain or verification record doesn't exist yet and something queries it, resolvers can cache the "it doesn't exist" answer, and you'll be stuck waiting out that negative TTL even after you create the record properly.
  4. Make the change, then check it from multiple resolvers with HostList's DNS propagation checker rather than relying on one browser tab that's cached the old answer. For the bigger picture of moving a whole site without losing search visibility, see HostList's guide to changing web host without losing rankings.
  5. Keep the old server running until the old TTL period has fully passed since the change went live. For an email move specifically, keep the old mailbox host accepting mail too during that window, work through HostList's email migration checklist so nothing bounces while the two systems overlap.
  6. Raise the TTL back up to one hour or more once the new setup is confirmed stable. Staying at 300 seconds forever just adds unnecessary lookup traffic for no ongoing benefit.
  7. Treat nameserver changes differently. The registry's NS record TTL (172800 seconds, two days, on .com in the example above) is outside your control entirely. Plan any nameserver move with a two-day overlap where both the old and new nameservers are answering correctly, because some resolvers simply won't ask again until that registry TTL expires.

What is negative caching, and what's the SOA minimum?

When a hostname does not exist (an NXDOMAIN response) or lacks the requested record type (NODATA), the authoritative server still returns a cacheable reply. It includes the zone's SOA record so resolvers know how long to retain that negative result. RFC 2308 defines the negative-caching TTL as the lower of two values: the SOA record's own TTL or its internal SOA MINIMUM field.

RFC 2308 also deprecated the original meaning of SOA MINIMUM, a minimum TTL for every record in the zone, which it says was never used in practice. It introduced the $TTL directive for zone files instead, as the default TTL for any record that doesn't specify its own. The RFC's guidance on negative TTLs is specific: one to three hours works well as a default, and values over a day have been found to be problematic.

Here's what that looks like read directly from a live zone:

dig +noall +answer hostlist.io SOA @1.1.1.1
hostlist.io.  1800  IN  SOA  clayton.ns.cloudflare.com. dns.cloudflare.com. 2420212506 10000 2400 604800 1800

The second field is the SOA record's own TTL and the last number is the SOA MINIMUM. Both are 1800 seconds (30 minutes), so that is the negative-caching TTL for this zone. If you query a hostname like mail.example.com before creating it, a resolver will cache that non-existence answer for the entire negative TTL. Add the record first and test second, or you wait out the negative TTL for a change that went live on the authoritative server instantly.

What do Cloudflare, AWS and Google Public DNS actually do with TTL?

Cloudflare: Proxied records (orange cloud) fix the TTL to Auto, which resolves to 300 seconds and cannot be modified, per Cloudflare's own TTL documentation. DNS-only records (grey cloud) have a wider range. They can be configured from 60 seconds, or 30 seconds on Enterprise plans, up to one day. Selecting Auto on a DNS-only record also sets the value to 300 seconds. Nameserver TTLs remain an entirely separate configuration.

AWS Route 53: Route 53 defines TTL as the caching duration for recursive resolvers, per AWS's Route 53 developer guide. A high value such as 172800 seconds (two days) reduces query volume to Route 53, cutting DNS latency for end users and lowering query charges, though updates propagate more slowly. AWS's guidance for updating an existing live record mirrors this migration pattern. Lower the TTL to 300 seconds, verify the new configuration, then raise it back up.

Google Public DNS: per Google Public DNS's FAQ, cached TTLs there are generally capped at six hours regardless of what your record's TTL actually says, so even a deliberately long TTL won't sit in Google's resolver cache forever. Its Flush Cache tool clears Google Public DNS's cache for common record types and most hostnames without needing to prove ownership, just a reCAPTCHA. After a nameserver change specifically, flush the domain itself first so the delegation refreshes, then flush subdomains like www afterwards. For a stale CNAME chain, flush starting from the last CNAME in the chain and work back to the name you actually queried. Domains using EDNS Client Subnet can't be flushed at all, so Google advises keeping TTLs on those records at 15 minutes or less.

If mail routing or reverse lookups factor into your migration, PTR records reside outside your forward zone. The entity allocating the IP block controls it, not your DNS provider, meaning you cannot adjust their TTL in your control panel. Consult HostList's PTR record guide for reverse DNS mechanics and their impact on email deliverability.

Frequently asked questions

What's the real difference between TTL 300 and TTL 3600?

At 300 seconds, a resolver can serve a stale record for up to five minutes after an update; with 3600 seconds, that window extends to an hour. 300 seconds suits active migrations, whilst 3600 seconds or higher minimises redundant recursive queries during steady state.

Does lowering the TTL make a DNS change happen faster everywhere, instantly?

No. Lowering a TTL only governs subsequent queries. It does not shorten the expiry time for resolvers that cached the record under the old value prior to your edit. This is why standard runbooks require dropping the TTL one full old-TTL duration prior to the cutover, not on migration day.

Can I just set every record's TTL to the lowest possible value and leave it there?

You can, but you're paying for it constantly in extra lookups and, per Google Public DNS's own performance notes, more cache misses that each cost a full resolution instead of an instant cached answer. Running at 300 seconds permanently makes sense for records behind a proxy like Cloudflare, where it's fixed anyway, but for a stable record it's an unnecessary tax.

I just created a new subdomain but it's not resolving anywhere, why?

If an automated lookup or mail delivery attempt checked for mail.yourdomain.com before you created the record, resolvers will cache the negative NXDOMAIN response for your zone's negative TTL (30 minutes in the hostlist.io example above). Create the record first, then verify it, and if a negative answer is already cached, wait out that negative TTL.

HostList on LinkedIn
More independent hosting data

Follow HostList for new rankings, original research, and changes across the hosting industry.

Gautam Khorana
Gautam Khorana
Founder, HostList.io

Over 10,000 websites launched. Years managing thousands of client sites. Built HostList because the world deserves honest hosting advice.

LinkedIn →

RELATED ARTICLES

Social AnimalFounder's agency214% more organic clicks after one rebuildOne client build holds LCP 1.1s, CLS 0.00 and PageSpeed 100, 18 months on. We build fast sites, then rank them.Book a 30-min call
Social AnimalFounder's agencyIs your site fast enough to rank?A London team offering Next.js and Astro builds with sub-second load times also provides a free scan covering Core Web Vitals, schema and crawl gaps.Scan my site free
Social AnimalFounder's agencyLeaving WordPress? Price the move firstEstimate a WordPress to Next.js or Astro migration in minutes. The fee is fixed, with no scope creep, and the work is senior-led.Price my migration
Social AnimalFounder's agencyGot a website brief? Reply in 48 hoursSend your RFP to a senior-led London agency with 200+ projects shipped. Fixed fee from the first call.Send my brief
.host domains from RadixSponsor.host: a domain that says what you doPremium .host names for hosting companies and infrastructure brands, from the Radix registry.See premium .host
RadixSponsorPremium names that work like prime real estate400,000+ short, memorable premium domains across .tech, .store, .online, .site and more. 20,000+ already sold.See Radix premiums
.tech domains from RadixSponsor.tech: the address for what you buildPremium .tech names like cloud.tech and micro.tech, from Radix. Short, dictionary-word domains for tech brands.See premium .tech
GreenGeeksSponsorEco-Friendly WordPress Hosting DealFast WordPress performance backed by expert 24/7 support, free migration, daily backups and built-in security.See GreenGeeks
HostPapaSponsorFast, Reliable, & Affordable Web HostingLaunch, grow and manage your website with reliable hosting, easy tools and 24/7 PapaSquad support.See HostPapa

Promoted placement. Does not affect HRI, ranking order or eligibility.