In this article, you’ll learn what is a TTL, how to update the TTL value, and also help you understand why do you need a TTL.
What Is a TTL
TTL or Time to Live, also known as Hop Limit, is a numerical value that is attached to each DNS record. The numerical value is normally set in “seconds”; so, if you want a 24-hour TTL value, the equivalent in seconds would be 86400. This value tells the resolver how long it should remember or cache the DNS query and when it should require a new one. Therefore, if the TTL is set to 86400, the DNS will be cached for 24 hours and a new DNS query will be sent once the period expires.
Why Do I Need a TTL
Caching allows for a faster internet experience because it requires lesser time to look up a DNS from your local resolver. So, if you’re not making any DNS updates every so often - such as updates on your A records, CNAME records, or MX records for example - then a standard 24-hour period for caching would be ideal. This means that if you have a website, people who frequently look it up will be able to load it faster.
On the other hand, if for example you have made a new website and you would like to update your A records, a TTL value of 86400 would mean that the old website will still show across the internet within the 24-hour window. After 24 hours and the caching period has expired, your DNS update will have fully propagated across the internet and your new website will appear. You can shorten the propagation period by lowering the TTL value first. Remember that lowering the value will also take time to propagate. Once it has, then you can make any DNS update and the changes will take effect faster.
How To Update the TTL Value
You can update the TTL value of your DNS using Plesk by following these easy steps:
- Access your Hosting Manager.
- Click on Websites & Domains from the left-side menu.
- Click on the SHOW MORE option under the domain name whose DNS you wish to manage.
- Click DNS Settings.
- Click on the SOA tab.
- In the TTL box, enter a preferred numerical value and select a unit from the drop-down list beside it.
With Plesk, you are not limited to using seconds as your TTL unit. You have the option to use minutes, hours, days, or weeks.
- Click OK to save your settings.
Note: The TTL value is applied immediately but may take up to 2 hours to propagate across the internet. If you have updated your TTL value and have seen no change, please wait for this propagation. Otherwise, it is advised that you contact us.
You have just updated the TTL value of your DNS using cPanel.
Important: If you have lowered your TTL value to make some DNS updates and your updates have already fully propagated, be sure to set your value back to a standard of 86400 to avoid overloading the server with a huge number of queries at once.