nslookup is a command-line tool that helps to find DNS records of a website. It sends a name server query to the DNS and obtains the corresponding IP address. It can also perform some complex functionality like finding details about FTP server, Mail server, and so on, but most of them are used by administrators. The best part of nslookup is it queries DNS server directly and doesn’t rely on the cache. Another tool used to verify connectivity is PING. It sends a packet of information to the IP address or Domain and gets back a reply in the form of packets. If everything goes well, all packets are received, but if not, it will help you identify where exactly there is a delay in the network. However, the ping command doesn’t always attempt a DNS lookup. This means it might be using the DNS cache, and use the IP address available in that table. While both of them helps you identify the host or IP address, but sometimes nslookup works, but ping fails in Windows 10.

Nslookup works but Ping fails

It may so happen that nslookup queries work for you, but when you try using PING, it fails. For example, if XYZ.com is the website name, here is how this situation will look like on command prompt. nslookup xyz.comServer: dns.company.comAddress: 192.168.1.38 C:> ping xyz.comPing request could not find host xyz.com. Please check the name and try again. When you use PING, the Domain name is converted into IP address, and then data is sent to that IP address. When a reply comes back, it means data is going back and forth to that domain without an issue. However, if the DNS fails to resolve the website’s IP address or if your computer doesn’t attempt a DNS lookup, you will receive a similar error message saying “Could not find host” and so on. Try the following troubleshooting techniques to resolve this issue:

1] Flush DNS, reset Winsock and reset TCP/IP

Sometimes the websites don’t resolve because the DNS in your PC still remembers old IP. So make sure to Flush the DNS, Reset Winsock and Reset TCP/IP.

You can also use our freeware FixWin to carry out these three operations with a click.

2] Force Windows to do a DNS lookup by using FQDN

On your computer, go to Settings > Network & Internet >  Status > Change adapter options.

Every time you query using PING or any other tool, it will add a “.” at the end, and will force the lookup.

3] Multiple NIC Scenario

If the computer has more than one NIC connected, and there are multiple default gateways, then it’s likely to create confusion. The solution for this is to remove default gateway from the configuration of all NICs but only one default gateway.

4] Use Google Public DNS

If it does not help, use Google Public DNS and see if that works for you. You need to explicitly change the DNS settings in your operating system use the DNS IP addresses.

First of all, right-click on the taskbar Network icon and select Network and Sharing Center.Select “Change Adapter Settings”.Search for the network connection that is used to connect to the internet; the option might be either “Local Area Connection” or “Wireless Connection”.Right-click on it and click Properties.Choose the new window to select “Internet Protocol 4 (TCP/IPv4)” and then click the Properties button.Click the checkbox for “Use the following DNS server addresses” in the new window.Enter in 8.8.8.8 and 8.8.4.4Finally, click OK and exit.

4] Check your Host File

Check your Host file to see if the website has been blocked. Many a time some third party application modifies the file to add blocklist of websites. If you find the entry, delete it.

5] Delete WLAN Profiles

As you connect to multiple networks, all of them are saved on your PC. Next time you are around that network, it will automatically connect. It is possible that one of those networks have gone rogue, and it’s not connecting properly, or probably it keeps disconnecting from that network. It is best to delete all the WLAN Network Profiles, and start fresh,

6] Reinstall Network Adapter Drivers

If deleting WLAN Profiles doesn’t work, the chances are that the network drivers are corrupted. You will need to reinstall the network adapters and reinstall the drivers as well for the best results.  Follow the steps in the guides, and it will resolve the issue for you. I am sure that for most of you, the first three troubleshooting tips will resolve the issue where nslookup works but ping fails. However, if its adapter driver is causing the issue, the rest of the tips will help you resolve it. Let us know which one worked for you?