How To's

How to Flush your DNS in Windows OS

DNS systems are required for the translation of websites into their IP address when accessing the internet. This process happens behind the scenes on your device whether it is a computer, mobile device, or even your Smart TV.

Lets dive into more details into what this is and how sometimes an outdated DNS record might stem problems.

How to Flush DNS (title image)

What is DNS?

DNS or Domain Name System resolves the domain name to IP addresses. In layman’s terms, when you type ‘youtube.com, the DNS turns that ‘youtube.com’ into an IP address, like 12.34.56.78.

To make it easier to understand, suppose that you want to send a letter to a home named YouTube. This letter is a network packet requesting to view the web page. When you send the letter to the mailing system (the internet), the DNS system maps the name ‘YouTube’ into its actual mailing address which in this case, is the IP address.

Just like how we cannot send physical emails in real life without a complete address, the same is the case with websites.

The successful conversion of ‘youtube.com’ into an IP address results in the retrieval of the required webpage successfully. So, if computers don’t perform this conversion, you won’t see the required webpage upon making the request.

If you want more technical details, take a look at Cloudflare’s DNS article.

Why DNS Caching and DNS Flushing are Necessary?

Whichever webpage you visit on the internet, the operating systems’ cache keeps a history of that webpage in terms of resolved domain names and their IP addresses. The operating system does that to provide an accelerated browsing experience. So, when you want to visit ‘youtube.com’ again, your computer won’t have to go to an external DNS server to resolve it to an IP address. Instead, the computer will just look at the internal cache and provide you with a quicker result. That’s a good thing.

But if you are having a problem accessing a certain website, then you may have to clear the internal DNS cache. For example, if ‘youtube.com’ has changed its IP address and your system is still keeping the old record, you won’t be able to resolve the name address query and will instead be presented with an error message. Here is where DNS flushing comes in.

What is DNS Flushing and How to Flush DNS?

DNS Flushing will clear all the IP addresses and their DNS records from the operating system’s cache. This is helpful in troubleshooting problems in which one cause might be an old DNS record. Here is the method on how to do this in Windows:

There is one universal rule though when flushing DNS. You need to close the application whether it is a web browser or a standalone application that you are troubleshooting. This is to avoid the existing DNS entry being readded.

In this example, we have demonstrated using Microsoft Teams.

  1. First of all, open the ‘Task Manager’ by searching it from the ‘Start menu.

    Opening the ‘Task Manager’ from the ‘Start menu’
  2. Then, scroll down to the ‘Microsoft Teams’ process and right-click on it.
  3. Now, choose the ‘End task’ option to force close the ‘Microsoft Teams’ application.

    Force closing the ‘Microsoft Teams’ application by right-clicking on its process and choosing the ‘End task’ option
  4. Now, press the ‘Windows + R’ keys and type ‘CMD.
  5. Then, (instead of pressing enter) you’ll press the ‘Ctrl + Shift + Enter’ keys to open the command prompt as administrator.

    Typing ‘cmd’ in the ‘Run’ dialog box
  6. In the next window, select ‘Yes’ for opening the ‘Command Prompt’ as administrator.

    Choosing ‘Yes’ for running CMD as administrator
  7. Now, release the current IP address by typing the following command and hitting the ‘Enter’ key.
ipconfig /release
  1. After that, input the following commands and press the ‘Enter’ key again to execute this command.
ipconfig /renew

ipconfig /flushdns

Note: Hit the ‘Enter’ key after each command to execute that particular command

Talha Saeed

I am a BSCS graduate and a technology nerd who now loves working and writing about computers and other tech-related stuff. In my free time, I like watching Netflix and playing Cricket 22 and The Witcher 3 (Wild Hunt).

Related Articles

Back to top button