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.
- TTL is part of the Domain Name System.
- TTLs are set by an authoritative nameserver for each resource record.
- 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.
- 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).
What is negative TTL ?
Useful information
Very nice and easy to understand :-) Thanks!!
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?
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?
if the ttl value is lower while pinging some other pc,is that means the pc is reached fast?
What will happen if i set ttl value to 144000 ? Is it good or bad ?
What will happen if i set TTL value to 30sec for MX ? Is it good or bad ?
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?
You create a wormhole and goes to another, parallel dimension.
Lol, nice spam link.
There is no wormhole, there is only Zuul.
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.
HAHAHA
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