Remember it: this command will solve your problems with the Internet

0
81

Today, whether we like it or not, our lives revolve around the Internet. Taking into account that any type of communication goes through this network, one of the most annoying problems that we can face is that our Windows PC does not want to connect to the Internet or that it does so erratically. To rule out that the problem is our connection, we just have to use our smartphone to clear up any doubts.

Once we have ruled out that the problem is related to our internet provider, it is time to start fighting with Windows. Many are the possible causes of our equipment not being able to connect to the Internet and, if it does, not working correctly. However, the first one to consider, which in 90% of situations is the culprit, is related to DNS.

How DNS works

A DNS server is in charge of translating a URL into IP addresses, which is how the internet really works. A URL is associated with an IP address, just like any electronic device that we have connected to our PC. All devices connected to a router are not identified by name, but by the IP address that each one has. URLs are used instead of IP addresses as it is easier to remember than sequences of 4 numbers separated by periods.

When we enter the URL of the website that we want to visit, our team stores its IP address so that we do not have to check it again the next time we want to visit it and thus take less time to display its content. The problem occurs when the DNS cache is damaged, since the browser will try to find the resolution in it to access without success, and it either thinks for a while or directly presents an access error. The solution to this problem is as simple as emptying so that the browser recreates it.

Ways to clear the DNS cache

Windows, like other operating systems, allows us to perform the same function in different ways. If we want to empty the cache to solve the internet connection problems that our PC is having, we can do it through CMD, using PowerShell or by creating an automation.

The easiest method, without accessing CMD, is through Windows, with the Win + R shortcut and entering the command:

ipconfig /flushdns

We can use this same code from the command line by opening CMD with administrator permissions.

Clear DNS cache

We can also use PowerShell, the vitamin CMD of Windows. To empty the Windows DNS using PowerShell, we must open this application, right-clicking on the start button and selecting Windows PowerShell (Administrator). Next, we enter the following command:

Clear-DnsClienteCache

If the problem with DNS has become a common thing on our computer, we should start considering the idea of ​​​​formatting the computer. In the meantime, we can create a script that, when run, directly executes the command without opening CMD or PowerShell. To do this, we will use the Notepad application and type the following command:

cmd.exe /k ipconfig /flushdns

Clear DNS cache

Next, click on File – Save as, and we establish any name that allows us to identify it (it does not matter which one we use) and save it with the .bat extension (this is important). Every time we want to empty the DNS cache, we just have to click twice on this file and the process will be carried out automatically.

Previous articleHonda CBR750R 2024, an affordable and devilish sports car
Next articleThese Logitech headphones, for PC and console, are half the price

LEAVE A REPLY

Please enter your comment!
Please enter your name here