What is the TTL (Time-To-Live) in a DNS record?

The Time To Live (TTL) record defines how long a DNS record should be considered valid before it has to be requested again.

Time To Live examples #

A TTL value can be as low as 1 second or as long as 10 years, or anything in between.

These values are all valid.

An example of 1hr time to live value:

ohdear.app.		3600	    IN  A

Or 1 second:

ohdear.app.		1	        IN  A

Or 5 years:

ohdear.app.		157680000	IN  A

As long as it's a positive natural number - not a decimal/float - it's a valid TTL.

What are TTLs used for? #

The Time To Live record defines how long a client - your computer, your webbrowser or your mailserver - can go without having to refresh the DNS record.

If your browser requested the IP address behind ohdear.app and it found a TTL of 3600, it doesn't have to request a new value for the next 1hr. In other words, it's cached on the client for the next 1hr.

The TTL is used as a means of speeding up DNS requests (by requiring fewer requests) and offloading nameservers, by making sure the client keeps a local copy of the DNS record for a predefined amount of time.

Was this page helpful to you? Feel free to reach out via support@ohdear.app or on Twitter via @OhDearApp if you have any other questions. We'd love to help!