Skip to content
  • Services
  • Pricing
  • Enterprise
  • Technology
  • Company
    • Support
  • BOOK DEMO
  • Login
Menu
  • Services
  • Pricing
  • Enterprise
  • Technology
  • Company
    • Support
  • BOOK DEMO
  • Login
DNS Made Easy Blog
Home  /  Resource  /  What is Time to Live (TTL)
Posted on June 30, 2021

What is Time to Live (TTL)

What is TTL (time to live)?

DNS records store pertinent information about a domain, such as IP addresses, hostnames, and ownership details, but there is one value in a record that dictates how long certain information is valid: Time to Live (TTL). This resource provides a breakdown of what TTL is all about.

TTL Meaning

Time to Live (TTL) is like an expiration date for DNS records. A TTL value is measured in seconds and is what resolvers use to determine how long to cache a DNS record before discarding or refreshing it. This setting plays a significant role in DNS as it can affect query volume and propagation speed.

Recommended TTL Values

The ideal value for TTL depends on record type and how often changes are expected to be made to the record. The higher the TTL, the longer a record will be stored in cache. This helps speed up the query resolution time, but can be problematic for domains that require frequent DNS changes. 

For records that seldom change, higher TTL values are typically best practice. For instance, TTL settings between 3,600 and 86,400 seconds are commonly used for MX and TXT records. On the flip side, domains with mission-critical services, have records that are updated frequently, or that use DNS load balancing configurations like failover would need lower TTL values, generally between 30 and 300 seconds.    

Tip: The shortest (safest) TTL value allowed for DNS records is 30 seconds. While it’s technically possible to set values lower than that, many resolvers won’t recognize shorter durations. If you want a TTL for a record less than 30 seconds, be sure to do a test record first.

When trying to determine the Time to Live for your records, keep in mind that whatever value you set is how long it will take before the record reflects any updates across all servers on the web. For example, if you have an A record set to 86,400 (24 hours) and you change the IP or update your configuration of this record, it will be a full day before everyone is served the new content.

Did you know?: Some internet service providers (ISPs) only update their records every few days and ignore TTL values. Most people will be returned the refreshed content, but there might be some users who are still served content based on the old record. 

TTL Example 

Now that I’ve covered what TTL is and what it does, now let’s take a look at an example of what it looks like in a record.

A (host)               Points to (IPv4 address)    TTL 

@ (root)      192.0.2.255   30

A (host)       Record Type Priority           Value TTL

@        MX 10 example1@constellix.com 86400

In the above scenario, resolvers would discard the record after 30 seconds and request new information when another query is received. The MX record, on the other hand, would only reflect changes after a full 24 hours have passed. 

Tip: If you need to make a change for a record that typically uses high TTL values, you can lower the TTL first, wait for the cache to expire, and then make your changes. 

TTL Logic

While you can’t predict the future, it’s always best to consider what conditions may warrant a change to your DNS records. An easy way to do this is by lowering TTL values. That said, you don’t want every record to be set too low, as this can cause an increase in queries, and subsequently, result in higher costs for your organization. A good balance would be to set any non-critical or seldom changing records to fall between 1 and 12 hours and use lower values for load-balancing configurations or mission-critical records that require frequent changes.

Understanding Time to Live 

Time to Live is a crucial part of DNS. It determines the length of time records should be stored in cache and affords businesses the flexibility to plan DNS updates strategically and seamlessly. Understanding which records require higher or lower values and how resolvers store records in cache will help ensure your end users receive the most up-to-date content and have an optimal experience when interacting with your domain.

Tags: cache that is ttl time to live time to live values ttl cache ttl example ttl logic ttl meaning ttl values
Share on Facebook Share on Twitter Share on LinkedIn

About Author

DNSME Team

DNS Made Easy is a subsidiary of Tiggee LLC, and is a world leader in providing global IP Anycast enterprise DNS services.

Facebook Twitter Google+ LinkedIn

Related Posts

  • what is an SSL certificate - TLS certificate - resource

    SSL/TLS Certificate: What is it and Why You Need One

    September 3, 2021
  • what is caching - how to flush DNS cache steps

    What is Caching?

    September 1, 2021
  • Why Enable 2FA? Benefits of two factor authentication

    Why Enable 2FA?

    August 30, 2021

Table of Contents

  • TTL Meaning
  • Recommended TTL Values
  • TTL Example 
  • TTL Logic
    • Understanding Time to Live 

Recent Posts

  • DNS Provider 2022
    DNS Made Easy – 2022 Preview and 2021 Review December 16, 2021
  • Top DNS Servers 2022
    Top DNS Servers 2022 December 8, 2021
  • Tiggee Acquires PerfOps
    Tiggee LLC Announces Acquisition of PerfOps Data Suite December 2, 2021
  • dns performance test - ecommerce providers
    Top 6 DNS Solutions for ECommerce Sites November 22, 2021
All Rights Reserved DNS Made Easy 2019 | Privacy Policy | sales@dnsmadeeasy.com