This article describes how to check whether the local DNS server works normally and how to update it. When we access a website, we directly enter the domain name in the browser, for example, www.webweb.com, when a website fails to be accessed normally, many users instinctively think that there is a problem with the local network or the target server. However, after some troubleshooting, however, it is not caused by these factors that the website cannot be accessed. When both the local network and the target server are normal, and the domain name's DNS server has a low probability of problems, in fact, this phenomenon may also be caused by the failure of domain name resolution on the local DNS server (the DNS server on the local computer. So how can I check whether the local DNS server is working normally and how can I quickly restore it when it is not working properly?
When the website cannot be accessed normally and the local DNS server may be faulty, we can use the NSLookup command in Windows to determine whether the local DNS server is working properly. Follow these steps:
1. On the local computer, click "start", "run", Enter cmd in the box, and click "OK". The new DOS window is displayed.
2. Enter the following command in the DOS interface and press Enter:
NSLookup-q = NS www.webweb.com
(Note: There is a space between NSLookup and-Q, and there is a space between ns and www.web.com)
If the local DNS server does not work properly, press the Enter key and the system will receive an error message: "DNS request timed out, timeout was 2 seconds ".
When you confirm that the website is inaccessible and the local DNS server cannot be properly resolved, check whether the local DNS server has any problems. You can view the local DNS server settings as follows:
1. Follow these steps to open the DOS window.
2. Enter ipconfig/all in the DOS interface and press Enter. As shown in the following figure, the DNS server corresponds to the IP address of the local DNS server. (For example, the test computer uses the DNS servers 8.8.8.8 and 8.8.4.4 provided by Google, as shown in .)
Ipconfig/all results
In fact, there are two options for "Local Connection" attribute "" Internet Protocol (TCT/IP) ":" automatically obtain the default DNS server address ", second, "Use the following DNS server address ". (Select the second test computer)
Local DNS server address
3. Check whether the IP address of the DNS server is Intranet or Internet. Because the "use the following DNS server address (8.8.8.8)" is selected as the Internet address, if we find that it cannot work properly, then, I can replace the current custom DNS server address with the DNS server address that can work normally. Here we recommend that you use the DNS server address provided by Google (primary DNS server 8.8.8.8 and secondary DNS Server: 8.8.4.4) if the specified DNS server address or the Automatically Selected DNS server is on the Intranet, you can contact the organization's network administrator to check the settings of the DNS server in the LAN, only when the DNS server can be properly resolved can the webpage be opened normally.
Use the hosts file to resolve the domain name to the specified IP Address
The above question is about whether the local DNS server can be properly resolved. If the local DNS server cannot be properly resolved, the website cannot be accessed, there is another way to access the website without the help of the local DNS server. We can implement this through the hosts file, because some users save the correspondence between frequently accessed website domain names and IP addresses in the hosts file, in this way, when a user on the computer wants to access a domain name, the system will automatically first check the local hosts file. If the hosts file contains the domain name to be accessed by the user, the corresponding IP address will be resolved immediately without going through the local DNS server, therefore, we can also add the ing between website domain names and IP addresses that cannot be properly resolved to the hosts file, so that the domain names can be successfully resolved to the corresponding IP address.
The following describes how to add a domain name and the corresponding IP address to the hosts file on the local computer. The procedure is as follows:
1. Find the hosts file. You can view the path "C: \ windows \ system32 \ drivers \ etc" and find the hosts under the path folder.
Alternatively, click "start", "run", enter drivers in the box, press the Enter key, and double-click the sub-file "etc" in the new window to view the hosts file.
2. Open the hosts file in Notepad. You can add the domain name and corresponding IP address to the bottom of the file and save the file. Take www.webweb.com as an example.
For example: 202.76.63.76 www.webweb.com
Add content to the hosts file
Last:How to clear the DNS cache on the local DNS Server
On a local computer, we often access a website in the form of domain names, then our system will automatically save the ing between the domain name and the IP address to the cache list of the local DNS server, so that when the domain name and the corresponding IP address change, the records in the cache list of the local DNS server will not change immediately, which may also lead to abnormal domain name resolution on the local DNS server, however, we can solve this problem by refreshing the local DNS Cache records. The procedure is as follows:
1. Click Start, Run, And Enter cmd in the box, and press OK to open the DOS window.
2. Enter ipconfig/flushdns in the DOS window and press enter to obtain the result:
Add DNS Cache