Skip to content
Operations

DNS cache and TTL: why a new address is not immediate

DNS is intentionally cached to reduce latency and name-server load. A record change therefore does not appear in every application at once. Caches may exist in the application, operating system, local resolver, and upstream recursive service. Troubleshooting should identify each layer instead of treating DNS as one global value.

2 min readReviewed and updated: August 6, 2026

Key points in one minute

  • TTL limits how long a DNS record may remain cached.
  • Different environments can temporarily return old and new addresses.
  • Clearing one cache does not clear every other cache.
  • A forced mapping is useful for testing but does not prove public propagation.

What TTL means

The zone owner sets a record's TTL as the maximum cache lifetime. A zero TTL prevents ordinary caching, but permanently low values increase query volume. For planned changes, operators commonly lower TTL in advance and restore a normal value after stabilization.

Where an old answer can remain

Results can be held by the application, system resolver, home or corporate DNS, and recursive service. An already-open connection can also continue using the old address after a fresh lookup changes. DNS cache and connection reuse must be checked separately.

Testing a specific address

curl can temporarily map a host and port to an address with CURLOPT_RESOLVE or the resolve command option. This tests a future endpoint while preserving the correct URL hostname and TLS identity. It does not show that public DNS has already propagated.

A diagnostic sequence

Record the authoritative value and TTL, then compare the resolvers relevant to the workflow. After TTL expiry, open a new connection and repeat the application request. Avoid restarting unrelated infrastructure before locating the exact cache or transport layer.

Practical checklist

  1. 1Record the previous and new DNS values.
  2. 2Verify TTL at the authoritative source.
  3. 3Compare local and server-side resolver answers.
  4. 4Create a fresh connection after TTL expiry.
  5. 5Remove temporary resolve rules after testing.

Sources and documentation

This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.

  1. 1.RFC Editor / IETF: Domain Names — Concepts and Facilities
  2. 2.curl project: CURLOPT_RESOLVE
  3. 3.RFC Editor / IETF: Happy Eyeballs Version 2

Continue reading

More articles on related topics

Step-by-step diagnostics

Proxy connection failed: diagnose the exact connection stage

Read

DNS and SOCKS5

DNS over SOCKS5: where the domain name is resolved

Read

Network compatibility

Dual stack: how clients choose between IPv4 and IPv6

Read