Support >
  About cybersecurity >
  If DNS resolution fails, can using an alternative DNS resolve the issue?

If DNS resolution fails, can using an alternative DNS resolve the issue?

Time : 2026-05-30 10:29:49
Edit : DNS.COM

  When DNS resolution fails, can using a backup DNS solve the problem? The direct answer is yes, but only for specific types of problems. Not all "resolution failures" can be resolved with a backup DNS.

  This may sound like a tongue twister, but the distinction is crucial. Many people, when faced with inaccessible websites or domain name resolution failures, immediately think, "Try a different DNS." Sometimes this works, sometimes it doesn't. Today, I'll thoroughly explain "when it works," "when it doesn't," and "the underlying logic."

  First, let's clarify a concept: Your computer actually has more than one DNS server.

  Many people believe their computer or phone uses only one DNS server, but this isn't the case.

  Whether it's Windows, macOS, Android, or iOS, network configuration allows setting two DNS addresses: a primary DNS and a backup DNS. These two servers are not in a primary/backup relationship; it's not a matter of "using the second only when the first fails." Their actual working method is: the operating system sends requests to both DNS servers simultaneously, or tries them sequentially, using whichever responds first.

  This design was introduced to address the single point of failure problem. If your primary DNS server goes down or is extremely slow, the operating system will automatically switch to a backup DNS server to ensure your domain name resolution requests don't completely fail due to a single server failure. However, this mechanism can only solve a very limited number of problems.

  II. Problems that backup DNS can solve: Server down or too slow

  These are the two most typical scenarios where backup DNS comes into play.

  Scenario 1: Primary DNS server down

  ISP-provided DNS servers occasionally experience regional failures. For example, if the DNS cluster of a certain provincial telecom provider has a problem, all users in that province using that DNS server will be unable to resolve domain names. If your computer is configured with a backup DNS server, such as 114.114.114.114 or 8.8.8.8, the operating system will detect the lack of response from the primary DNS server and automatically switch to the backup DNS, restoring your network access to normal.

  In this case, the "resolution not working" is essentially due to the DNS server itself being unavailable, not a problem with your domain name records. Using a backup DNS server can certainly solve the problem because it provides a working solution.

  Scenario 2: Preferred DNS Server Response is Unacceptably Slow

  Another scenario: The DNS server isn't down, but its response is extremely slow. For example, some public DNS servers used in China may have latency as high as 100-200 milliseconds, requiring you to wait for the DNS resolution to complete every time you open a webpage. In this case, the operating system may determine that this DNS is "unreliable" and switch to a faster alternative DNS.

  If you find that your website loads significantly faster after switching DNS, it means that your previous preferred DNS was performing poorly, and the alternative DNS automatically switched for you.

  III. Problems that Alternative DNS Cannot Solve: Problems with the DNS Records Themselves

  This is where many people get confused. If the DNS resolution is not working for any of the following reasons, changing a hundred alternative DNS servers won't help.

  First Type: Domain Name Resolution Records Haven't Taken Effect Yet

  You just modified the A record or CNAME record at your domain registrar, for example, changing the website's IP from 1.2.3.4 to 5.6.7.8. At this time, no matter which DNS server you use to query, the authoritative DNS will return the latest record. Where is the problem? It lies in the intermediate links—your computer's local cache, your ISP's DNS cache, and the public DNS cache are all still storing old records.

  This isn't because the DNS server is "broken," but because the cache hasn't expired. If you switch to an alternative DNS server, and its cache hasn't expired either, it will return the old IP address. You can switch to ten different DNS servers, and as long as their TTLs haven't expired, the result will be the same.

  The solution is to wait for the cache to expire, or manually refresh the cache (e.g., using `ipconfig /flushdns` to clear the local cache in Windows), instead of blindly switching DNS servers.

  The second type: The authoritative DNS server itself is misconfigured.

  This situation is more insidious. Suppose your domain is hosted with a DNS provider, and you've pointed the A record to 192.168.1.1 (an unreachable internal network address) in the backend, or you forgot to add a resolution record for a subdomain. In this case, no matter which recursive DNS server you use (whether it's 114, Alibaba, Google, or Cloudflare), querying the authoritative DNS will yield the same result—misconfiguration.

  Alternate DNS servers can help you bypass a faulty recursive DNS server, but they can't bypass errors in the authoritative DNS itself. This is because all recursive DNS servers query the same data source.

  Third Category: Domain Locked or Suspended by Registrar

  If a domain expires, is not verified, or is blocked due to complaints, the registrar will change the domain's resolution status to "hold" or "serverHold." In this case, the authoritative DNS will either not return a resolution result or return a specific error code. Changing your DNS server won't help because the problem lies upstream.

  Fourth Category: Local Hosts File Tampered With

  This is a common scenario disguised as a "DNS problem." Malware or you yourself may have accidentally modified the hosts file, hardcoding example.com to an incorrect IP address. In this case, your computer doesn't go through a DNS server at all; it reads the IP directly from the local hosts file. Changing to a hundred alternative DNS servers won't help because the request was never even sent.

  The correct procedure in this situation is to check the `C:\Windows\System32\drivers\etc\hosts` file (Windows) or `/etc/hosts` (Mac/Linux) and delete any abnormal entries.

  IV. The Working Mechanism of Alternate DNS: Not As You Imagine

  After understanding what alternate DNS can and cannot solve, it's necessary to understand how it actually works.

  Most people assume the relationship between primary and alternate DNS is: the primary DNS is used first, and the alternate DNS is used only when the primary DNS fails. The reality is far more complex.

  Windows Behavior: By default, Windows sends resolution requests to all configured DNS servers simultaneously, using a "whoever is fastest" strategy. Specifically, it first sends a request to the primary DNS. If no response is received within a certain time threshold (usually 1 second), it simultaneously sends a request to the alternate DNS. Whichever responds first is used.

  macOS Behavior: macOS queries DNS servers in the order listed. Only when the primary DNS times out or returns an error (such as `SERVFAIL`) will it switch to the next one.

  Android/iOS Behavior: Mobile operating systems typically use all configured DNS servers more aggressively, especially in Wi-Fi environments, often performing parallel queries.

  Therefore, when you encounter a DNS resolution failure, if the preferred DNS responds with an incorrect result (e.g., returning an NXDOMAIN for a non-existent domain), the operating system will not classify this result as a "failure" and will not automatically switch to the alternative DNS. Switching to the alternative DNS essentially means manually bypassing this incorrect result.

  This is why sometimes manually switching to the alternative DNS can solve the problem—because the operating system doesn't automatically switch for you; you have to do it yourself.

  V. A Smarter Approach: Not Changing DNS, But Designing a DNS Switching Strategy

  If you are a website operator or developer, relying on users to change their DNS to access your website is clearly unrealistic. What you should do is address the DNS resolution failure issue at its source.

  Strategy 1: Reduce TTL Value

  If you plan to change your server IP soon, reduce the domain's TTL (Time to Live) from 24 hours to 300 seconds (5 minutes) in advance. This way, the global DNS cache can be updated within 5 minutes, and users will hardly feel any resolution delay. Once the switch is complete and stable, upgrade the TTL back.

  Strategy Two: Use a DNS Provider's Multi-Node Resolution

  Choose a DNS hosting service with built-in multi-node, highly available services, such as Alibaba Cloud DNS, Cloudflare DNS, or AWS Route 53. These services deploy multiple nodes globally, so a problem with a single node won't affect overall resolution. Users don't need to switch to a backup DNS themselves, as the service provider has already handled disaster recovery.

  Strategy Three: Implement Fallback on the Client Side

  If you are an app developer or developing embedded devices, you can implement multi-DNS fallback logic in your code. For example, set up a list of DNS servers; if the first one times out or returns an error, automatically retry with the second. This way, even if the user's network environment is poor, your application can still obtain the correct resolution result through the backup DNS.

  Strategy Four: Use HTTP DNS to Avoid Traditional DNS Issues

  For mobile apps, traditional DNS is prone to hijacking and high latency. HTTP DNS bypasses UDP port 53 and directly queries the DNS provider for domain name resolution results via HTTP protocol, eliminating the problem of "backup DNS not working." Alibaba Cloud and Tencent Cloud both provide HTTP DNS services.

  VI. What are the correct troubleshooting steps when DNS resolution fails?

  Alternate DNS is a quick fix, but it's not a panacea. I recommend troubleshooting in the following order, rather than blindly changing DNS.

  Step 1: Confirm if you are the only one experiencing access problems.

  Use the "Super Ping" or "DNS Query" function in webmaster tools to see what IP addresses are returned from different nodes across the country. If most nodes return correct IP addresses, and only yours is incorrect, the problem is local. If all nodes return incorrect or unavailable addresses, the problem lies with the domain name itself or the authoritative DNS.

  Step 2: Clear your local DNS cache.

  On Windows, execute `ipconfig /flushdns`; on macOS, execute `sudo killall -HUP mDNSResponder`. Many "DNS resolution failures" are actually due to a local cache not being refreshed; clearing it will solve the problem.

  Step 3: Test with a different DNS server

  In your local network settings, temporarily change the DNS to 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare), then run `nslookup` on your domain. If it resolves correctly after the change, your original preferred DNS had a problem (cache not refreshed or poisoned). If it still doesn't work, then the problem isn't with the DNS server.

  Step 4: Check the hosts file

  Don't skip this step. Sometimes the problem isn't with the DNS, but with an incorrect mapping in the hosts file. Windows users should be especially careful, as many domestic software programs secretly modify the hosts file.

  Step 5: Directly query the authoritative DNS

  Skip all intermediate steps and directly query the authoritative DNS server. In `nslookup`, execute `set type=ns` to find the address of your domain's authoritative DNS server, then use `server ` to query it directly. If the authoritative DNS returns the correct result, the problem lies in the recursive DNS section. If even the authoritative DNS is incorrect, then there's a problem with your domain configuration.

  Returning to the initial question: When DNS resolution fails, can using a backup DNS solve the problem? The answer is: it depends.

  If the primary DNS server is down, responding slowly, or returning incorrect results, switching to a backup DNS will indeed solve the problem. However, if the problem is due to incorrect domain configuration, recently modified records not yet taking effect, a tampered hosts file, or the domain being locked by the registrar, switching to a backup DNS is a waste of effort.

  More importantly, don't develop the habit of "changing DNS every time there's a problem." First, spend 30 seconds using nslookup to determine the exact cause of the resolution failure before attempting a targeted solution. Blindly changing DNS might occasionally work, but most of the time it's a waste of time.

  Finally, a final suggestion: switch the DNS servers for your home router, work computer, and personal laptop to a reliable public DNS server—choose from 114, Alibaba Cloud, Google DNS, or Cloudflare. While the default DNS assigned by your ISP isn't terrible, public DNS servers are more reliable in terms of stability and refresh speed. Doing this will significantly reduce your chances of encountering "resolution failure" issues.

DNS Amy
DNS Luna
DNS NOC
Title
Email Address
Type
Information
Code
Submit