Windows cannot contact the DNS server

Windows cannot contact the device or resource of the primary DNS server. How do I fix it?

Updated: January 6, 2023
Views

When your computer loses access to the Internet, websites stop opening in your browser, and various errors appear, we recommend running troubleshooting. It’s helpful because, after troubleshooting, you can see all sorts of errors. 

One such error you can encounter is: “Windows fails to communicate with a device or resource (primary DNS server)” in Windows 10, Windows 8 (8.1), and Windows 7. From the description itself, it is already clear that the problem is somehow related to DNS. Because of the DNS in Windows, the Internet can stop working, and different failures occur. In such cases, connection to the Internet via Wi-Fi or network cable seems to work, the connection is established, and there are no errors, but the sites in the browser do not open. 

To help you better understand the problem, we will provide some explanation concerning DNS servers. They perform a very important task – converting common to us addresses of sites to IP addresses. It allows browsers to start loading sites. If the DNS server is not working, the browser can not access the site, as it cannot recognize its IP address. Usually, we automatically get the DNS settings from the Internet provider and use their servers. However, you can manually change these settings. For example, to prescribe the addresses of public DNS servers from Google. By the way, it’s one of the most effective solutions to this problem.

This is what the error looks like as a result of Windows network diagnostics:

Error resulting from Windows Network Diagnostics

Browsers will display various errors related to DNS or messages that it failed to establish a connection with the site, failed to find the IP address of the server, etc. 

DNS related errors that browsers display

Now that we’ve clarified the problem, let’s move to some possible solutions.

Solutions to the main DNS server connection error in Windows

I always recommend that you reboot your computer and router first. Turn off the router’s power and then turn it back on after a few minutes. Maybe the error will disappear, and you won’t have to waste time and nerves on other solutions.

You need to prescribe static DNS server addresses from Google. I recommend doing this even if everything works for you and there are no problems. As practice shows, Google’s public DNS servers are more stable and faster than your ISP. In order to do this, follow these steps:

  1. We need to open the “Network Connections” window. In Windows 10/8/7, you can do this in different ways. For example, through the control panel and options. But there is one universal solution – press Win+R, copy the command ncpa.cpl and execute it by pressing Ok. 
  2. Then right-click on the adapter, through which we are connected to the Internet, and open its “Properties“.
  3. Then open the properties “IP version 4 (TCP/IPv4)” and in the corresponding fields, type in the DNS addresses: 8.8.8.8 and 8.8.4.4
  4. After you click Ok, the system will load for a while, and everything should work. If the sites still don’t open, restart your computer.

Start/Restart the DNS Client service. There is a service in Windows that manages the operation of DNS. Most likely, it’s enabled, but you need to check it. You should also restart it.

  1. Services can be opened through the Control Panel, through a search in Windows 10, or run the services.msc command in the “Run” window (you can open it with the Win+R shortcut).
  2. Right-click on the “DNS Client” service and select “Restart“. Confirm the restart. And if it was originally disabled, then select “Run“. You can also open its properties, stop the service, and start it again.

Restart "DNS client"

Very often the “DNS Client” service cannot be restarted. The menu items are simply not active. If this is the case, run the command line or Windows PowerShell (you can start a Windows + X shortcut) as an administrator and run the following commands in turn: 

ipconfig /flushdns;

ipconfig /registerdns; 

netsh winsock reset.

Reboot the system.

Antiviruses and firewalls interfering with the DNS server

Antiviruses and firewalls (as well as viruses and various malware) can produce the error “Windows cannot connect to the device or resource (primary DNS server)”. Especially Avast antivirus. One of its components changes the network settings, and Windows cannot contact the DNS server. 

As practice shows, disabling the antivirus doesn’t help. It must be uninstalled completely. During the reinstallation, select basic components (without VPN, any network traffic filters, etc.).

I think one of these solutions should help to get rid of this error. However, if none has helped, you can always ask Howly for help through the chat window. 

Do you like the article?
  • Great
  • Good
  • Okay
  • So...So
  • Terrible

Average: 0 /5
Total ratings: 0

No votes so far! Be the first to rate this post.

No comments yet...

What about starting a discussion? Be the first to share your thoughts!

Comments

0 comment
    Write a comment
    Thank you for sharing your opinion!

    Trusted & Secured