{"id":26663,"date":"2023-03-11T15:31:25","date_gmt":"2023-03-11T15:31:25","guid":{"rendered":"http:\/\/localhost\/helpold\/?p=26663"},"modified":"2024-12-24T22:28:19","modified_gmt":"2024-12-24T18:58:19","slug":"dns-records-ttl","status":"publish","type":"post","link":"https:\/\/www.arvancloud.ir\/help\/en\/dns-records-ttl\/","title":{"rendered":"Investigating DNS Records TTL"},"content":{"rendered":"<p class=\"wysiwyg-text-align-justify\">Time to Live (TTL) indicates the time period that a recursive resolver can keep a DNS record in cache. This parameter has a direct effect on response time of DNS records, because when a recursive resolver has a DNS record in its cache, a complete DNS lookup is no longer required.<\/p>\n<h3 class=\"wysiwyg-text-align-justify\"><strong>TTL functionality<\/strong><\/h3>\n<p class=\"wysiwyg-text-align-justify\">When a resolver receives a request for accessing a domain, it will search its own cache for the DNS records of the domain, first. If a record is found in the cache, it will check its TTL and if it\u2019s not expired, the resolver will use the cached record.<br \/>\nIf the record is not found in the cache or is expired, the resolver will send a request to the root server, then to the TLD server, and so on.<\/p>\n<h3 class=\"wysiwyg-text-align-justify\"><strong>The Effect of TTL on Propagation Time of a Modified Record<\/strong><\/h3>\n<p class=\"wysiwyg-text-align-justify\">If a DNS record is cached, the recursive resolver would not send a request to access this record to upstream DNS servers until its expired, and in the meantime it will use the old cached record.<br \/>\nTherefore, the TTL of a DNS record must be chosen carefully. To better understand this, consider a record that is constantly changing and its TTL is set to a large value, for example one day. It will take a whole day for the recursive resolver to request and then receive the new value of the changed record. The time that takes for the changes in DNS records to be propagated to all DNS servers, is called the propagation time.<\/p>\n<h3 class=\"wysiwyg-text-align-justify\"><\/h3>\n<h3 class=\"wysiwyg-text-align-justify\"><strong>Checking the TTL of DNS records using dig command<\/strong><\/h3>\n<p class=\"wysiwyg-text-align-justify\">in Unix based operating systems and Mac OS X, you can use dig command to request all DNS records and see their TTL values.<\/p>\n<pre><code>dig +nocmd example.com any +noall +answer<\/code><\/pre>\n<h3 class=\"wysiwyg-text-align-justify\"><strong>Best values for TTL<\/strong><\/h3>\n<p class=\"wysiwyg-text-align-justify\">There are various DNS records with different uses. The TTL of a record must be determined based on record type, functionality, and its frequency of change in both short-term and long-term. The typical TTL value of some records are presented here:<br \/>\n\u2981<strong>\u00a0A and AAAA records:<\/strong>\u00a0between 5 minutes to 1 hour<br \/>\n\u2981\u00a0<strong>CNAME records:<\/strong>\u00a024 hours<br \/>\n\u2981\u00a0<strong>TXT records:<\/strong>\u00a012 hours<br \/>\n\u2981<strong>\u00a0MX records:<\/strong>\u00a012 hours<\/p>\n<h3 class=\"wysiwyg-text-align-justify\"><\/h3>\n<h3 class=\"wysiwyg-text-align-justify\"><strong>Setting the TTL of DNS records in Arvan Cloud\u2019s panel<\/strong><\/h3>\n<p class=\"wysiwyg-text-align-justify\">You can set the TTL value of a record when you are defining it in the following path: Panel -&gt;CDN -&gt; DNS<br \/>\nIn Arvan Cloud, the default value of TTL is set to two minutes.<\/p>\n<p class=\"wysiwyg-text-align-justify\">Also, in order to change the TTL value of a predefined record, you simply need to click on the edit icon in front of the record and set the TTL value in the opened window.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time to Live (TTL) indicates the time period that a recursive resolver can keep a DNS record in cache. This parameter has a direct effect on response time of DNS records, because when a recursive resolver has a DNS record in its cache, a complete DNS lookup is no longer required. TTL functionality When a [&hellip;]<\/p>\n","protected":false},"author":79,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"r1_post_views_count":"886","feedback_yes":"0","feedback_no":"0","ads_id_sidebar":"","ads_id_content":"","footnotes":""},"categories":[249,285],"tags":[],"class_list":["post-26663","post","type-post","status-publish","format-standard","hentry","category-cdn","category-dns-setting"],"lang":"en","translations":{"en":26663},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts\/26663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/users\/79"}],"replies":[{"embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/comments?post=26663"}],"version-history":[{"count":2,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts\/26663\/revisions"}],"predecessor-version":[{"id":28076,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/posts\/26663\/revisions\/28076"}],"wp:attachment":[{"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/media?parent=26663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/categories?post=26663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.arvancloud.ir\/help\/wp-json\/wp\/v2\/tags?post=26663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}