All Products
Search
Document Center

Alibaba Cloud DNS:Add a cache retention domain name

Last Updated:Nov 07, 2023

Overview

The Domain Name System (DNS) records of the domain names that have the cache retention feature enabled are always cached. If such a domain name has no DNS record cached, the system automatically obtains DNS records from the Internet. If the domain name has DNS records cached, the system does not automatically update the cached DNS records. If the system receives DNS requests after the time-to-live (TTL) of the DNS records expires, the system uses the cached DNS records to respond to the DNS requests and then attempts to obtain the updated DNS records from the Internet. If the system does not obtain updated DNS records, the system continues to use the cached DNS records to respond to subsequent DNS requests.

We recommend that you enable the cache retention feature for hot-spot domain names and important domain names. This way, DNS records can be permanently cached, which improves the speed of resolving these domain names in Private DNS and prevents the DNS service from being interrupted due to the service failures of the authoritative DNS providers of these domain names. The system continues to use cached DNS records to respond to DNS requests during the service failures of the authoritative DNS providers.

Note

If you have added CNAME records for domain names, only the DNS records of the first hop of the CNAME chain are cached, but the DNS records of subsequent hops are not cached. If you want to accelerate the entire CNAME resolution process, you must add all the domain names on the CNAME chain as cache retention domain names.

Procedure

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Private DNS (PrivateZone). On the page that appears, click Configuration Mode in the upper-right corner, click the Cache Module tab, and then click Add Cache Retention Domain Name.

  3. In the Add Cache Retention Domain Name panel, set Cache Retention Domain Name and Record Type, turn on or turn off Cache Retention, set Effective Scope of Caching Rule, and then click OK. image.png

    Note
    • After cache retention is enabled for a domain name, the system periodically obtains the latest DNS records for the subdomain names of the domain name to update the cached DNS records. This accelerates the resolution of domain names in the intranet networks where the cache retention rules take effect.

    • The cache retention rules take effect only in the networks within the effective scope. The resolution of domain names in the networks out of the effective scope cannot be accelerated.

    • The cache retention feature only takes effect on the public domain names that are queried by using the recursion module. This feature does not take effect on the domain names that are queried by using the built-in authoritative module or forward module.