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.
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 18.104.22.168.
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.
- First of all, open the ‘Task Manager’ by searching it from the ‘Start menu.’
- Then, scroll down to the ‘Microsoft Teams’ process and right-click on it.
- Now, choose the ‘End task’ option to force close the ‘Microsoft Teams’ application.
- Now, press the ‘Windows + R’ keys and type ‘CMD.’
- Then, (instead of pressing enter) you’ll press the ‘Ctrl + Shift + Enter’ keys to open the command prompt as administrator.
- In the next window, select ‘Yes’ for opening the ‘Command Prompt’ as administrator.
- Now, release the current IP address by typing the following command and hitting the ‘Enter’ key.
- 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