Windows can't resolve domain name (Fix)

Windows can’t resolve domain name (Fix)

We have noticed that sometimes, Windows fails to resolve the domain name when one tries to ping it or do nslookup. Sometimes, when trying to run the nslookup command, they encounter this; however, on other occasions, nslookup works, but pinging the same hostname fails. In this post, we will discuss this issue and see what to do when Windows can’t resolve domain names. We will also discuss this issue in WSL in this post.

Why is my domain not resolving?

Your system may fail to resolve a domain due to the absence of a proper DNS A record pointing to a valid origin IP address, or if a CNAME record in the Cloudflare DNS points to an unresolvable external domain. I suggest checking if the proper records are in place first. If that is not the case, follow the solutions mentioned below.

Fix Windows can’t resolve domain name

If Windows can’t resolve the domain name, first of all, you should try rebooting the server, as the issue can be a glitch. However, if you can’t reboot as it is production or rebooting does not help, follow the solutions mentioned below.

  1. Try registering DNS manually
  2. Check the IP configuration
  3. Allow outgoing DNS requests in the server firewall
  4. Fix corrupted GPO files
  5. Reset Network Protocols

Let us talk about them in detail.

1] Try registering DNS manually

Sometimes, a device gets unregistered and reregistered from the backend due to activity or patching. In that case, the client may have to register the device manually on their computer. To do so, open Command Prompt as an administrator and run the following command.

ipconfig /registerdns

Finally, reboot your computer and check if the issue is resolved.

2] Check the IP configuration

We should also look into your computer’s IPv4 configuration and make sure that your NetBIOS Setting corresponds with your DNS configuration. To do this, follow the steps mentioned below.

  1. Open Server Manager.
  2. Go to Local Server and then click on the hyperlink next to the Ethernet (or WiFi if you are connected to one).
  3. Right-click on your network and click on Properties.
  4. Again click on Properties.
  5. Look for Internet Protocol Version 4 (TCP/IPv4), select it, and click on Properties.
  6. Click on Advanced and then go to the Wins tab.
  7. In the NetBIOS setting, the default selection allows the use of the NetBIOS setting provided by the DHCP server. If a static IP address is used or the DHCP server does not provide a NetBIOS setting, you can enable NetBIOS over TCP/IP to ensure proper functionality. So, select Enable NetBIOS over TCP/IP.
  8. Click Ok.

Finally, check if the issue is resolved.

3] Allow outgoing DNS requests in the server firewall

Next, we will configure the firewall to allow outgoing DNS requests. This should be done by the server admin or whoever has access to the Server Manager. To do this, follow the steps mentioned below.

  1. Open the Server Manager.
  2. Go to Tools > Windows Defender Firewall with Advanced Security.
  3. Now, from the left side of the window, click on Outbound Rules > New Rule.
  4. You need to set the Rule Type to Port and click Next.
  5. Now, in Protocol and Ports, select UDP, and enter 53 as the port number.
  6. Click on Next.
  7. Select Allow the connection > Next.
  8. Select the profile where you want this rule implemented and click Next.
  9. Name the rule “Outgoing DNS Requests” or anything of your choice and click on Finish.

You can then check if the rule is enabled and listed under Outbound Rules to verify it.

4] Fix Corrupted Local GPO Files

You can encounter this issue if local GPO files are corrupted. Because of this, Windows cannot apply the DNS policy and throws the error in question. We will delete those files and then attempt to implement the GPO changes to resolve them. Follow the steps mentioned below to do the same.

  1. First of all, open File Explorer and then rename or delete on the client computer C:WindowsSystem32GroupPolicyMachineRegistry.pol.
  2. Now, open the Command Prompt as an administrator.
  3. Run gpupdate /force.

This will again apply the Group Policy issued by the server admin. Now see if the issue is resolved.

Read: GPUpdate Force not working on Windows computers

5] Reset Network Protocols

If after forcing the GPO update, you encounter this issue, go ahead and reset the client’s network protocols. To do so, open Command Prompt as an admin and run the following commands.

Reset TCP/IP

netsh int ip reset

Reset Winsock

netsh winsock reset

Flush DNS

ipconfig /flushdns
ipconfig /registerdns

Finally, check if the issue is resolved.

Read: Server not operational error when adding User to a trusting domain

Why is my domain name not working?

You need to ensure that your domain name has not expired and that it is registered with a reputable domain name registrar. Check your DNS settings to confirm that they are correct and that your domain name is pointing to the right server or IP address.

Also Read: Windows Firewall not recognizing Domain network.

If your domain name is not working, here are some steps you can take to troubleshoot the issue:

  1. Check Domain Registration:
    • Ensure your domain is still registered and hasn’t expired. You can use a WHOIS lookup tool to check the status of your domain.
  2. DNS Settings:
    • Verify your DNS settings with your domain registrar. Ensure that the nameservers are correctly pointing to your hosting provider.
    • Check the DNS records (A record, CNAME, etc.) to ensure they point to the correct IP address or server.
  3. Propagation Time:
    • If you’ve recently changed your DNS settings, it may take some time (up to 48 hours) for the changes to propagate.
  4. Clear Cache:
    • Clear your browser cache and try accessing your domain from a different browser or device.
  5. Check Hosting Status:
    • Ensure your hosting account is active and that there are no issues on the server side. If your hosting service is down, your domain will not resolve.
  6. Firewall Settings:
    • If you’re using a firewall, ensure it is not blocking access to your domain.
  7. Consult Your Registrar/Hosting Provider:
    • If you’ve checked everything and your domain is still not working, contact your domain registrar or hosting provider for assistance. They can help identify the issue more specifically.
Scroll to Top