The Domain Name System (DNS) translates human-readable domain names (like www.example.com) into machine-readable IP addresses (like 192.0.2.1). And DNS cache is a temporary database maintained by your computer that stores recently accessed domain names and their corresponding IP addresses. DNS cache helps speed up the process of resolving domain names to IP addresses, thus improving your internet browsing experience. However, sometimes the DNS cache can become outdated or corrupted, leading to various connectivity issues. In such cases, you can run Flush DNS command to remove this stored cache and forces your device to retrieve the information from the DNS again. If you are experiencing internet connectivity problems, Here is how to flush DNS cache on Windows 11 to fix such problems.
How to Flush DNS Cache in Windows 11
The DNS cache (also known as DNS Resolver Cache) stores recently accessed domain names and their corresponding IP addresses for a specified period. The next time you open the same web page, the web browser no longer requests a DNS server to translate the URL to an IP address. It takes help from the DNS resolver cache in your operating system.
The DNS cache improves the performance and efficiency of your internet browsing experience. However, over time, the information in the cache can become outdated or corrupted, leading to potential connectivity issues, such as trouble accessing certain websites, slow-loading web pages and more. In such situations, you need flush DNS cache to allow your Windows computer to communicate with the host correctly.
Using Command Prompt
- First Open Command Prompt with Administrative Privileges
- Press Windows key + S and type cmd, Right-click on “Command Prompt” and Select “Run as administrator.”
- In the Command Prompt window, type the following command and press Enter:
Now, the DNS cache will be flushed and you will see a confirmation message saying “Windows IP Configuration. Successfully flushed the DNS Resolver Cache.” That’s it!
The older DNS cache files have been removed from your Windows 11 computer which might have been causing the errors (like this website is not available or unable to load particular websites) while loading a webpage.
Using Windows PowerShell
- Right-click on the start menu and select Windows PowerShell (Admin) to Open Windows PowerShell with Administrative Privileges
- Type the command Clear-DnsClientCache and press enter key,
- Once the command is executed, you should see no output if it was successful.
Using Windows Settings
- Press the Windows key + I on your keyboard to open Windows Settings.
- Select “Network & Internet.” Scroll down to find the “Network reset” option and click on it.
- Click on the “Reset now” button to initiate the reset process.
- This action will clear the DNS cache along with other network-related settings.
After the reset process is complete, you’ll need to restart your computer for the changes to take effect.
View DNS Cache in Windows 11
After flushing the DNS cache, if you want to confirm whether DNS cache has been cleared or not then you can apply the following command to view DNS cache on Windows 10 PC.
How to Disable DNS Cache in Windows 11
For any reason, if you wish to disable DNS Cache for a while and enable it again then use the following commands.
net stop dnscache
To turn on DNS caching, run the following command
net start dnscache
One thing you need to keep in your mind is that this disabling DNS cache command is applicable for a particular session only and when you will restart your computer, the DNS caching will be enabled automatically.
Flush and Reset the DNS Resolver Cache on web browsers
We do a lot of internet browsing. Our browser web pages and other information in the browser’s cache so that it would be faster for it to fetch the webpage or website next time. It sure helps in faster browsing but over a period of a few months, it accumulates a lot of data that is no longer required. So, in order to speed up the internet browsing and overall performance of Windows, it’s a good idea to clear the browser cache from time to time.
First to Flush and Reset the DNS Resolver Cache on web browsers
- Open Chrome type chrome://net-internals/#dns and press enter key
- If you are Microsoft Edge user type edge://net-internals/#dns and press enter key
- Beside the Host resolver cache text, click the Clear host cache button.
Mozilla Firefox users type about:networking#dns and press enter, then click on Clear DNS cache option.
To Clear the Browser cache
If you are Microsoft Edge or Googe chrome user:
- Open the browser and press shirt + Ctrl + Del to open the Clear browsing data popup,
- Check mark on cached images and files, (You can select other options as well) select time rage and click Clear Data.
Clear Cache Data on Firefox browser is a little different,
- Open the Firefox browser, at the address bar type about:preferences#privacy and press enter key
- Checkmark next to cached web content and click on clear.
What is DNS resolver cache?
- DNS resolver cache is a temporary storage that stores DNS information on your device to speed up future DNS queries.
Why would I need to flush DNS resolver cache?
- Flushing the DNS resolver cache is necessary to resolve domain name resolution issues, clear outdated or corrupted entries, and fetch the latest DNS information.
How do I flush DNS resolver cache on Windows?
- Open Command Prompt as an administrator and type “ipconfig /flushdns.”
How do I flush DNS resolver cache on macOS?
- Open Terminal, type “sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder,” and enter your admin password.
How do I flush DNS resolver cache on Linux?
- Open a terminal and type “sudo systemd-resolve –flush-caches.”
Can I flush DNS resolver cache on my router?
- Yes, but the process varies by router brand and model. Check the documentation for specific instructions.
Are there any downsides to flushing the DNS resolver cache?
- No significant downsides. It might take a bit longer to resolve domain names temporarily after flushing.