≡ Menu
Home > whatis > What is Time To Live (TTL)?

What is Time To Live (TTL)?

Time to live (TTL) is used for computer data including DNS servers. It is nothing but time on the period of time or number of iterations or transmissions in computer and computer network technology that a unit of data (e.g. a packet) can experience before it should be discarded.

TTL and DNS Caching

TTL value tells local resolving name servers how long a record should be stored locally before a new copy of the record must be retrieved from DNS. The record storage is known as the DNS cache, and the act of storing records is called caching.

  1. TTL is part of the Domain Name System.
  2. TTLs are set by an authoritative nameserver for each resource record.
  3. TTLs are used for caching purpose. For example, www.dnsknowledge.com TTL value is 86400 seconds, which is 24 hours. The higher a record’s TTL, the longer the information will be cached, and the less queries a client will have to make in order to find the domain.
  4. TTLs will be used by the resolving name server to speed up name resolving by caching results locally.

Can I Set Shorter TTLs?

Yes, you can set shorter TTLs. However, it can cause heavier loads on an authoritative nameserver, but can be useful when changing the address of critical services like web servers or MX records (mail server pointers), and therefore are often lowered by the DNS administrator prior to a service being moved, in order to minimize disruptions.

Common TTL Values

Usually TTL value is 86400 seconds, which is 24 hours. This is good starting point for most records. However, you can set higher TTL for MX or CNAME records as they are expected to change very rarely. If your service is critical, it is recommend that you set TTL to 1 hour (3600 seconds).

{ 15 comments… add one }
  • Eric Jaehwang Kim June 27, 2013, 9:58 am

    What is negative TTL ?

  • JItenra July 16, 2013, 5:19 am

    Useful information

  • Sega July 17, 2014, 3:11 am

    Very nice and easy to understand :-) Thanks!!

  • Brian November 24, 2014, 12:22 am

    I got my laptop free from an acquaintance. Whenever I “ipconfig/displaydns” after I “/flushdns” there remains this pornhub dot com with a time to live of 86400 & it never goes away ;how can I eradicate this from dns?

  • Alexander March 4, 2015, 9:16 am

    How frequently in practice do we encounter host names that resolve to multiple IP addresses WITH different TTLs? Is it worth providing memory for that possibility if I develop a simple DNS client?

  • pullarao April 7, 2015, 7:01 am

    if the ttl value is lower while pinging some other pc,is that means the pc is reached fast?

  • Kartik September 18, 2017, 1:52 am

    What will happen if i set ttl value to 144000 ? Is it good or bad ?

  • Rohan Bhor October 16, 2018, 12:17 am

    What will happen if i set TTL value to 30sec for MX ? Is it good or bad ?

  • Phillip June 5, 2019, 12:30 pm

    What will happen if I purchase a website from dev-optic and I purchase my domain name from godaddy but I want my nameservers to point to hostgator?

  • Morpheus October 7, 2019, 10:10 pm

    You create a wormhole and goes to another, parallel dimension.

  • Lol November 14, 2019, 4:23 pm

    Lol, nice spam link.

  • Zol November 14, 2019, 5:03 pm

    There is no wormhole, there is only Zuul.

  • Joe Blow February 17, 2020, 2:39 pm

    Is that a serious question? There is no such thing as a negative TTL, the same way you can’t spend negative time doing something.

  • stranger21 April 15, 2020, 2:56 am


  • Patrick Mevzek April 16, 2020, 5:35 pm

    There is a “negative TTL”. It is now the last item of the SOA record. It gives how much time to cache the NXDOMAIN (domain does not exist) answers. See https://tools.ietf.org/html/rfc2308

Leave a Comment