Domains

DNS TTL Explained: What It Is, How to Set It, and Why It Matters

by dotCanada Team
DNS TTL Explained: What It Is, How to Set It, and Why It Matters

If you have ever changed a DNS record and then waited hours for it to "propagate," you have already experienced the effect of TTL - even if you did not know it by name. Understanding TTL turns DNS changes from an anxious waiting game into a predictable, controllable process.

What TTL Is

TTL stands for Time to Live. In the context of DNS, it is a number (in seconds) attached to each DNS record that tells resolvers how long they should cache that record before checking for an updated version.

When a browser or server needs to look up your domain, it asks a DNS resolver (usually operated by an ISP, Google, Cloudflare, or similar). That resolver asks your authoritative nameserver for the answer, receives it along with the TTL value, stores it in cache, and serves that cached answer to everyone who asks - until the TTL expires. Once it expires, the resolver fetches a fresh copy.

TTL is set per record. Your A record can have a different TTL than your MX record or CNAME.

Common TTL Values and What They Mean

300 (5 minutes) - Changes propagate to most resolvers within 5-10 minutes. Useful when you need fast updates, such as during a server migration or when troubleshooting DNS issues.

3600 (1 hour) - A reasonable middle ground. Changes are visible to most of the internet within a couple of hours.

86400 (24 hours) - A common default. This means resolvers can cache your record for an entire day before checking for updates. Changes take up to 24 hours to fully propagate worldwide.

Some registrars and DNS panels set new records with a 14400 (4 hour) default, which is also reasonable for stable production environments.

Why Lowering TTL Before a DNS Change Is a Best Practice

This is the most practically useful thing to understand about TTL: it is something you can change in advance of a migration.

If your A record has a TTL of 86400 and you update it, resolvers that cached the old value up to 24 hours before your change can continue serving stale data for up to 24 hours after your change. That is 24 hours of some visitors reaching the old server.

The solution: 48 hours before your planned migration, lower the TTL on the records you intend to change to 300 or 600. Wait for that new TTL to propagate (which takes as long as the old TTL allowed - up to 24 hours itself). Once the low TTL is in effect everywhere, make your DNS change. Now the old cached values expire in 5-10 minutes, and your migration is effectively instant.

After the migration is complete and stable, raise the TTL back to a higher value.

The Trade-Off of Low TTL

Low TTL values are not costless. Every time a cached record expires, the resolver must make a fresh query to your authoritative nameserver. Very low TTL values (like 60 seconds) on high-traffic domains generate significantly more DNS query load, which can add marginal cost if you pay per query (as with Route 53 or Cloudflare paid plans), and adds a small overhead to every lookup for visitors.

For most small and medium Canadian business websites, this is not a meaningful concern. The query volume is manageable at any realistic TTL. But for high-traffic or enterprise domains, keeping TTL elevated during stable periods is sensible.

How to Set TTL in cPanel Zone Editor

In cPanel, go to Domains > Zone Editor and click "Manage" next to your domain. You will see your DNS records listed. Each record has a TTL column - click the edit icon to modify a specific record and update the TTL field.

Values must be entered in seconds. Enter 300 for five minutes, 3600 for one hour, 86400 for 24 hours.

The Cascading Effect of ISP-Level DNS Caching

One complicating factor: not all DNS resolvers respect TTL correctly. Some ISPs and older resolvers ignore TTL entirely and cache records for their own fixed intervals regardless of what you specify. This is why DNS "propagation" is never truly instantaneous even with a TTL of 60 - a small percentage of visitors may be served stale data from non-compliant resolvers for longer than your TTL would suggest.

This is also why it is worth keeping your old server running and accessible for at least a few hours (ideally 24-48 hours) after a major migration, even with a low TTL. The vast majority of the internet will update quickly, but a tail of stale resolver caches will trickle in for some time.

TTL is one of those DNS concepts that seems technical until you understand it - and then feels obvious. Lower it before you change, raise it after things are stable, and your next domain migration will be far less stressful.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today