Time to live (TTL) defines how long, in seconds, a local DNS server caches a DNS record. By default, this duration matches the TTL set on the authoritative DNS server.
How TTL works
-
When a local DNS server receives a query, it forwards the request to an authoritative DNS server, such as Alibaba Cloud DNS, to retrieve the record.
-
If the server receives another query for the same domain while the cache is valid, it returns the cached result without contacting the authoritative server again.
-
When the cache expires, the local DNS server discards the record. The next query for that domain triggers a fresh lookup from the authoritative DNS server.
By default, local DNS servers cache records for the TTL duration set in Public Zone. However, some carriers may enforce their own caching policies, which can delay propagation.
TTL values for different editions
The minimum configurable TTL value varies by Public Zone edition. To set a smaller TTL value, purchase Hosted Public Zone (Subscription).
|
Edition |
Free edition |
Personal edition |
Enterprise ultimate and premium edition |
|
Minimum TTL value |
600 seconds (10 minutes) |
600 seconds (10 minutes) |
1 second |
|
Maximum TTL value |
86400 seconds (24 hours) |
86400 seconds (24 hours) |
86400 seconds (24 hours) |
Use cases
-
Increase TTL to reduce recursive queries and speed up resolution.
DNS records rarely change. A higher TTL extends cache duration on local DNS servers, so queries resolve from cache instead of triggering recursive lookups. This improves resolution speed.
-
Decrease TTL to minimize downtime during IP address changes.
When you update a DNS record to point to a new IP address, caching causes the change to propagate unevenly. Some local DNS servers still serve the old record while others have already fetched the new one, splitting traffic between the old and new servers.
Best practice for record updates
-
Check the current TTL for your domain. In this example, assume it is 10 minutes.
-
Lower the TTL to the minimum your edition allows. For example, Enterprise Ultimate Edition supports 1 second. Minimum values vary by edition — see TTL values for different editions.
-
Wait for the original TTL to expire (10 minutes in this example). After expiration, local DNS servers worldwide query the authoritative server and cache the record with the new, shorter TTL.
-
Update the IP address in your DNS record. With a 1-second TTL, local DNS servers worldwide fetch the new record almost immediately.
-
After confirming propagation and service stability, restore the TTL to a higher value, such as 10 minutes. A low TTL reduces cache effectiveness, increases recursive queries, and can slow resolution.
NoteSome local DNS servers may not honor the TTL set by your authoritative server. If records in some regions do not match your settings, wait longer and retest.
Procedure
-
Go to the Alibaba Cloud DNS - Public Zone console.
-
Click the target domain name to go to the Settings page.
-
In the Actions column of the target DNS record, click Edit.
-
In the Edit Record dialog box, modify the TTL value and click OK.
Set the TTL value to 1 second.
FAQ
Why can't I set the TTL value to 1 second?
The minimum TTL varies by Alibaba Cloud DNS edition. TTL values for different editions.
I set the TTL to 1 second, but changes still seem to take a long time to propagate. Why?
Your new TTL setting takes effect only after the previous cache expires. For example, if the original TTL was 10 minutes, you must wait that long for local DNS servers to fetch the new 1-second TTL. After that, subsequent record changes will propagate in about 1 second.