Support >
  About cybersecurity >
  After deleting the DNS records, the website is sometimes accessible and sometimes inaccessible?

After deleting the DNS records, the website is sometimes accessible and sometimes inaccessible?

Time : 2026-08-09 10:00:37
Edit : DNS.COM

  The "ghost" phenomenon—where a website is sometimes accessible and sometimes inaccessible—after deleting a domain name resolution record is one of the most perplexing and frustrating problems in DNS management. This intermittent failure is not due to network instability or a server malfunction; its root cause lies in the inherent asynchronous nature of the distributed DNS caching system. Recursive DNS servers, operating systems, browsers, and even applications around the world each hold different versions of the resolution results, creating a chaotic situation where old and new records are interleaved globally.

  To understand why this "Schrödinger's visit" occurs, we first need to delve into the DNS query chain. When a user enters a domain name into their browser, the query request passes sequentially through the browser cache, the operating system cache (hosts file and system DNS cache), the local network router cache, and finally reaches the ISP or a public DNS recursive server. The recursive server itself maintains a large cache pool, only initiating a new query to an authoritative DNS server when its own cache expires. Each link in this chain independently follows the TTL (Time-To-Live) rule. TTL is a countdown timer measured in seconds. Due to the different nodes' timing and network latency, their cache expiration times are staggered. This asynchronicity leads to a crucial fact: when a record is deleted, not all nodes globally are "simultaneously informed" of the change. Instead, each node independently refreshes its status at a random point in the future, based on its remaining time window.

  The inconsistency in cache granularity further exacerbates the chaos. After a record is deleted from the authoritative DNS server, recursive servers whose caches have not yet expired will continue to return the old record to the user, and access will proceed normally. However, servers whose caches have expired will initiate a new query to the authoritative DNS, receiving an empty "record does not exist" response, at which point the user's access will fail. Adding to the complexity, recursive servers of the same operator may cache independently in different provinces or even different cities, resulting in regional differences such as "normal access for users in Beijing, intermittent inaccessibility for users in Shanghai, and complete inaccessibility for users in Guangzhou." If you test immediately after deleting a record using a mobile 4G network and an office broadband connection, you're likely to get drastically different results. This directly reflects the inconsistency in global DNS caching.

  Another easily overlooked detail is the residual effect of TTL (Time To Live). Many people don't realize that the TTL value you set before deleting a record determines the length of the resulting chaos window. Assuming the original TTL of this record was 86,400 seconds (24 hours), before you deleted it, recursive servers worldwide had already cached this record according to this 24-hour lifespan. The deletion operation takes effect only after these caches naturally run out—meaning that for up to 24 hours after deletion, some users may always be able to access it, while others may never be able to, making availability completely unpredictable. This "long tail effect" caused by a long TTL is the primary reason why "sometimes accessible, sometimes inaccessible" availability can last for hours or even days.

  Browser local caching also exacerbates the problem. Modern browsers (Chrome, Firefox, Safari, etc.) have built-in DNS caching mechanisms to speed up page loading. The expiration time of these caching mechanisms is usually independent of the system DNS cache and doesn't necessarily strictly adhere to the TTL issued by the authoritative DNS. Even if the operating system and recursive servers have refreshed the resolution results, the browser may still be using the old IP address in the cache, leading to drastically different access experiences for the same user when closing and reopening the browser window or using incognito mode. More subtly, browsers also cache the page resources themselves and may even maintain persistent connections through HTTP/2 or HTTP/3 server push mechanisms. In some cases, even if the DNS has resolved to a new address, the browser may still reuse the old TCP connection, creating an abnormal state where "the resolution has changed, but the access path remains the same."

  Besides the resolution confusion caused by caching, some deeper technical factors exacerbate this phenomenon. The situation is particularly complex for domains using CNAME record chains. If you delete a CNAME record at a certain point in the chain, the upstream recursive server may only cache the final A record result, without caching the complete path of the intermediate CNAME records. When the final A record cache expires, the recursive server, upon re-querying, finds the intermediate CNAME record missing, the entire DNS resolution chain broken, and access fails. However, if other recursive servers still cache the final A record, access is normal. This problem caused by inconsistent CNAME chain caching is often more difficult to troubleshoot than simple A record deletion. For load balancing or DNS-level failover configurations, the authoritative DNS may return different IPs based on different regions or health check results. After deleting a record, some recursive servers in certain regions might have obtained a valid IP before deletion and cached it long-term, while other regions would encounter an empty DNS resolution result first. This time difference causes geographical differences in access success rates.

  Resolving this intermittent access failure requires a systematic troubleshooting and recovery strategy. The first step is to use an authoritative query tool (such as `dig +trace` or `nslookup -type=any` specifying the authoritative DNS server) to directly send a query request to your authoritative DNS to confirm that the record has indeed been deleted and is no longer returning any results. This step eliminates the possibility of an anomaly on the authoritative side, clarifying that the problem lies only at the caching level. The second step is to use public DNS testing tools to simultaneously query the domain's DNS resolution results from multiple locations globally. These tools can visually display the currently returned record values ​​in different regions, helping you determine the extent of the confusion. Common online tools such as DNSPod's DNS testing and Cloudflare's Diagnostic Center can be used directly in your browser.

  After confirming that the root cause of the problem is cache inconsistency, the most direct recovery method is to actively refresh the cache of critical nodes. For your own device, you can refresh the operating system's DNS cache via command line. At the browser level, you can clear the browser's internal DNS cache or restart the browser process. For public DNS servers, ordinary users cannot manually refresh their cache, but if you are a domain administrator, you can submit a refresh request through the "cache clearing" tools provided by these service providers.

  For users using CDN or cloud WAF services, maintaining the stability of CNAME records is even more important. If you must delete CNAME records provided by the CDN, it is recommended to first change the domain's origin server configuration on the CDN service provider's side to directly return to the origin IP, ensuring that the origin server can handle direct traffic, and then perform DNS-level changes. This practice, known as "safe shutdown" or "graceful degradation," avoids the direct exposure of the origin server and the problem of instantaneous traffic surges caused by the deletion of CDN records. At the same time, it can also retain a unified resolution destination for users and reduce uncertainty.

DNS Amy
DNS Jade
DNS Anna
DNS NOC
Title
Email Address
Type
Information
Code
Submit