ThisCalculator

Everyday

TTL in DNS for Hosting: What It Means

Updated · Standard formula, shown below

Cache duration 3,600 seconds
Cache duration
60.00 minutes
Result
Cache duration
1.00 hours
Result
TTL value
3600 seconds
You entered

This page explains what a TTL (Time to Live) is in DNS for hosting, how it works, and how to choose the right value for your domain. You enter a TTL value in seconds in your DNS management panel, and the system tells you how long resolvers should cache your DNS records before asking again. The result is a balance between faster lookups and quicker propagation when you make changes.

What Does TTL Stand For?

TTL stands for Time to Live. It is a standard term used in networking and DNS, not slang or informal. The origin goes back to the early Internet protocols, where a packet was given a maximum number of hops it could travel before being discarded. In DNS, the same idea was adapted: a TTL tells a recursive resolver how long it can keep a DNS record in its cache before it must query the authoritative server again.

In a sentence, you might say: “I set the TTL to 300 seconds so that changes to my A record propagate faster.” The term is used exactly that way in hosting documentation and control panels.

How DNS TTL Works

When someone visits your website, their device asks a recursive resolver (like the one from their ISP or a public DNS service) for your domain’s IP address. The resolver looks up the answer from your authoritative DNS server, receives the record along with a TTL value, and stores it in its cache for that many seconds.

For example, if your A record has a TTL of 3600 seconds (1 hour), the resolver will not ask your DNS server again for that record for one hour. If you change the IP address during that hour, some visitors may still get the old IP until the cached TTL expires.

TTL values are expressed in seconds. Common values include:

  • 300 seconds (5 minutes)
  • 900 seconds (15 minutes)
  • 3600 seconds (1 hour)
  • 86400 seconds (1 day)

How to Choose a TTL Value

The right TTL depends on how often you expect to change your DNS records and how much query load you want your DNS server to handle.

  • Low TTL (300-900 seconds): Use when you plan to make changes soon, such as moving to a new hosting provider or changing IP addresses. Changes propagate quickly, but your DNS server gets more queries.
  • Medium TTL (3600 seconds): A good default for most websites. Balances propagation speed and server load.
  • High TTL (86400 seconds): Use for stable records that rarely change, like MX records or long-standing A records. Reduces queries but changes take up to a day to propagate.

Many hosting providers recommend lowering the TTL before a planned change, then raising it back after the change is complete.

Common Problems and Misconceptions

One common misconception is that TTL is the time it takes for a DNS change to go into effect. In reality, TTL is the maximum cache time, but the actual propagation time can be longer or shorter depending on how many resolvers have cached the old record and when they expire it.

Another issue is that some resolvers ignore TTLs or cap them. For example, certain ISPs may force a minimum TTL of 30 minutes or a maximum of 24 hours, which can cause unexpected delays.

When you change a DNS record, you may also need to consider the TTL of the parent record (like the NS record) or the SOA record, but for most hosting changes, the A record TTL is what matters.

TTL vs. Propagation

TTL and propagation are related but not the same. Propagation is the process of updated DNS information spreading across the internet. TTL determines how long each resolver holds onto the old information before checking for a new one. Lowering the TTL before a change does not make the change instant, but it reduces the maximum time any resolver will keep the old record.

For example, if you set TTL to 300 seconds, most resolvers will ask for a fresh record within 5 minutes. But if a resolver had already cached the old record with a TTL of 86400 seconds, it will keep it for the remaining time.

Cost and Safety Considerations

There is no direct cost associated with TTL, but a very low TTL can increase the number of queries to your authoritative DNS server, which might matter if you pay for DNS hosting based on query volume. Most hosting plans include DNS management at no extra cost.

From a safety perspective, a very high TTL can be risky if you need to change records quickly during an outage or attack. A very low TTL can make your DNS more vulnerable to cache poisoning attacks if the resolver does not properly validate responses, but this is not a common concern for typical website hosting.

Alternatives to Manual TTL Management

Some DNS providers offer features like prefetching or adaptive TTL that automatically adjust TTL based on record stability. Others allow you to set TTL per record, which is useful if you want a low TTL for a record you change often and a high TTL for stable records.

If you use a third-party DNS service, you may have more granular control over TTL than your hosting provider’s default DNS.

Frequently Asked Questions

What is a good TTL for DNS?
A TTL of 3600 seconds (1 hour) is a good default for most websites. If you are planning changes, use 300 seconds temporarily.

Does TTL affect website speed?
Indirectly. A higher TTL means fewer DNS lookups, which can slightly reduce page load time for returning visitors. But the difference is usually negligible.

How do I change the TTL in cPanel?
In cPanel, go to Zone Editor, find the record you want to change, and click “Manage.” You can edit the TTL field there.

Why is my DNS change not propagating after 24 hours?
Your ISP or a public resolver may have cached the old record with a long TTL, or they may be ignoring TTLs. You can try flushing your local DNS cache or using a different resolver to test.

Can TTL be zero?
Yes, but it is not recommended. A TTL of zero means the record is never cached, so every lookup goes to the authoritative server. This is sometimes used for dynamic records but can cause high load.

Related

Formula used
in t | TTL value | seconds | 3600 | 0
out cache | Cache duration | seconds | t | 0
out minutes | Cache duration | minutes | t / 60 | 2
out hours | Cache duration | hours | t / 3600 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.