Get IT Solutions

How to do IT
Menu
  • Home
  • SCCM 2012
    • Deploy Packages
    • Troubleshooting errors SCCM 2012
  • Windows
    • Applications Silent Install
    • Windows Tools
    • Windows Error
    • Script
    • Exchange Server
    • Troubleshooting Office
    • Applications Errors
  • Database
    • SQL Server
    • MySQL
    • Oracle
  • Cybersecurity
  • Other
  • Reviews

Windows Flush DNS in Windows 10 / OS X / Linux

In this article we’ll talk about different ways on how  to windows flush dns and clear dns cache on windows 10. Also  we will see different commands regarding OSX flush dns and linux flush dns. DNS stands for Domain Name System. It translates website names into IP addresses which computers can understand. This happens for every website you want to visit. Every time a user visits a website by its hostname, the web browser initiates a request out to the internet, but this request cannot be completed until the site’s name is “converted” into an IP address. Windows comes with an option which stores the specified DNS server address to speed up browsing experience.

Table of Contents

  • Flush DNS in Windows 10
    • Why do you need to Flush and Clear DNS Cache
    • How to see your current windows DNS Cache
    • Windows Flush DNS Cache, Method 1 – Windows Command Using ipconfig /flushdns
    • Windows Flush DNS Cache, Method 2 – Command prompt
    • Windows Flush DNS Cache, Method 3 – Reset of Winsock settings
    • Troubleshooting Windows Flush DNS Cache
  •  OS X Flush DNS
    • Flush DNS on different OS X Version
  • Linux flush dns

Flush DNS in Windows 10

Why do you need to Flush and Clear DNS Cache

There are many reasons why you may need to flush your DNS in Windows 10, the most common one being that websites aren’t resolving correctly and it may be an issue with your DNS cache holding an incorrect address. Also, reset DNS cache can be useful after changing the DNS settings on the computer or router, and also in cases when the desired site has changed the IP address to another (after moving the site to another hosting provider), and you still have the old IP in your cache and so the site just does not open.

The described methods in our article of Windows flush DNS cache works in all versions of Windows from Windows XP, Windows 7 to Windows 10.

 

How to see your current windows DNS Cache

To see your current Windows DNS Cache, open a new elevated command prompt instance and type the following command: ipconfig /displaydns

ipconfig displaydns

ipconfig displaydns

The command will produce a very long output or you can redirect command very long output to text file for examination by typing the following command: ipconfig /displaydns > C:\Windows\dns_cache.txt

ipconfig output

ipconfig output

The output can be found on the following path: C:\Windows. Then you can open the dns_cache.txt file created and inspect its entries.

 

Windows Flush DNS Cache, Method 1 – Windows Command Using ipconfig /flushdns

  1. Hold down the Windows key and press “R” to bring up the Run dialog box.
  2. Type ipconfig /flushdns then press “Enter“.
ipconfig flushdns

ipconfig flushdns

A command box will flash on the screen and the DNS Resolver cache is cleared.

 

Windows Flush DNS Cache, Method 2 – Command prompt

  1. Click on start menu search and type ‘command’.
  2. From search results right click on Command Prompt (make sure you’re running it as administrator).
  3. Type ipconfig /flushdns and hit enter.

If everything went well, the result should be “Successfully flushed the DNS Resolver Cache“. This means that cleaning the DNS cache was successful.

Windows Flush DNS

Windows Flush DNS

Note: Flush DNS Cache can be done even using Windows PowerShell:

  1. Select the “Start” button, then type “powershell“(make sure you’re running it as administrator).
  2. Select “Windows PowerShell“.
  3. Type Clear-DnsClientCache, then press “Enter“.
Windows flush dns command powershell

Windows flush dns command powershell

 

Windows Flush DNS Cache, Method 3 – Reset of Winsock settings

Another way is to perform a reset of Winsock settings.

READ ALSO -   How to Use the Slmgr activate and Slmgr rearm
  1. Click on start menu search and type ‘command’.
  2. From search results right click on Command Prompt (make sure you’re running it as administrator).
  3. Type netsh winsock reset and hit enter.
flush dns windows 10 - netsh winsock reset

flush dns windows 10 – netsh winsock reset

Also you can restart the DNS client service to clear the cache. You can perform this task from services.msc console. Right click on DNS Client service and select Restart option.

Reset dns - DNS Client Service

Reset dns – DNS Client Service

Troubleshooting Windows Flush DNS Cache

If after running the command ipconfig /flushdns you receive an error Could not flush the DNS Resolver Cache: Function failed during execution, most likely the system service “DNS client” is disabled.

ipconfig flushdns error

ipconfig flushdns error

Run this service or restart it (in case of errors when the service is in running state).

 OS X Flush DNS

For Mac and Linux lovers the commands to flush cache are slightly different depending on the version you’re running.  If you are a network administrator, web developer or a system administrator of Mac, you may have to flush DNS cache on macOS for quite a few reasons. Especially, if you want a name server to resolve rightly or a change in DNS address to be detected by your individual system.

Besides the above reasons, if you have altered the /etc/ hosts file and you need the modifications to take effect minus rebooting the Mac, then you may find it necessary to dump and reset DNS caches. Resetting DNS cache is not the same in each version of Mac OS X. If you are a Mac user for a longer period, you may know that this process in OS X Yosemite is similar to some other older versions. This is probably due to the discoveryd replacing mDNSResponder, and then switching back to mDNSResponder yet again. Despite the change, flushing DNS cache remains a terminal command in Yosemite, but there is a little different depending on the exact version of the OS you are using. You get to clear either Unicast DNS or Multicast DNS, or both. If you are attempting to reset all DNS caches on the Mac, then you may have to consider clearing both as a proper measure.

Flush DNS on different OS X Version

First, make sure you’ve opened up your terminal on your computer.

  • Go to Applications -> Utilities -> Terminal
  • Type the following command and press Enter

 

OS X 12 (Sierra) and later

macbook$ sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache

OS X 11 (El Capitan) and OS X 12 (Sierra)

macbook$ sudo killall -HUP mDNSResponder

OS X 10.10 (Yosemite)

Versions 10.10.4+

macbook$ sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

Versions 10.10.1, 10.10.2, 10.10.3

macbook$ sudo discoveryutil udnsflushcaches

OS X 10.9 (Mavericks)

macbook$ dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OS X 10.7 (Lion) and 10.8 (Mountain Lion)

macbook$ sudo killall -HUP mDNSResponder

OS X 10.5 (Leopard) and 10.6 (Snow Leopard)

macbook$ dscacheutil -flushcache

OS X 10.4 (Tiger)

macbook$ lookupd -flushcache

Linux flush dns

Most current Linux distributions do not use a DNS resolver cache in the same way that Windows and Mac OS X use. To confirm which particular daemon is installed for your Linux distribution, check the website or its forum pages.

However, a common DNS caching application sometimes used is the Name Service Caching Daemon (nscd). It’s most likely not installed by default so there is no need to flush the cache. But, if you’ve already installed it you can flush the cache on linux by running the following command in a terminal:

[local]$ sudo service nscd restart 

Alternatively, you can try these commands:

[local]$ /etc/rc.d/init.d/nscd stop
[local]$ /etc/rc.d/init.d/nscd start
Share
Tweet
Google+
Pinterest
Linkedin
Stumble
Email
Prev Article
Next Article

Related Articles

pdf preview handler outlook
The PDF preview handler error most of the time is …

Troubleshoot PDF Preview Handler – This File Cannot Be Previewed

Best Solutions For Resource Not Owned BSoD Error On Windows 11/10/7
BSoD error codes are the worst nightmare for any Windows …

Best Solutions For Resource Not Owned BSoD Error On Windows 11/10/7

Best Computers & Laptops

Best Computer for Cyber Security – Laptop and Desktop
Best Computer for Cyber Security
Hey, are you seeking the best computer for cyber security? Well, we must say you have come to the right place to find your answer and guidance. There are a plethora of products out there for you to pick from ...
Read More
Best Computer for Microsoft Office & Excel – Laptop and Desktop
Best Computer for Microsoft Office & Excel
Are you finding the Best Computer for Microsoft Office and Excel? In modern days, the best laptop or desktop set is the one which is both portable, has good looks and offers the smoothest performance. Microsoft Office is a package ...
Read More
Best Computer for Hacking – Laptop and Desktop Selection
Best computer for Hacking
When it comes to hacking, either laptop or desktop, choosing the best computer for hacking would be an exhilarating job. There are many specifications to be considered for hacking ...
Read More

SQL Server Tips

FIX sqlstate 42000 – mysql error 1064 – you have an error in your sql syntax
Sqlstate 42000 Is a general code that come together with other number. Most often comes with the code 1064 and ...
Read More
The execute permission was denied on the object – SQL Server Error
The execute permission was denied on the object
The following article will handle “the execute permission was denied on the object” error appears on SQL Server. This error ...
Read More
How to Read Data from LDF file in SQL Server – A Complete Guide
Read LDF File
Hello Everyone, Today we are going to address the most popular query of SQL users, how to read data from ...
Read More

Search

We are on:

Get FREE SPACE for your PC

3 Method to Delete Temp Files in Windows 7/10 including vbs script

In this post we will explain how to delete temp files windows 7 using three different methods including vbs script ...
Read More

Fastest way to delete hiberfil sys from windows 10/8/7 and XP – CMD

In this article we will explain how to remove or delete hiberfil sys from Windows 10/8/7 and XP . If you does ...
Read More

Learn How to Silent Install Applications

Silent Install Adobe Flash Player
In this tutorial will explain how to silent install adobe flash player 25, Msi and Exe version. How to disable auto update and uninstall older ...
Read More
Java Silent Install and Uninstall Older Version – Deploy Package MSI
This tutorial will explain how to silent install Java MSI/EXE version and disable auto-update. The command line will also uninstall the ...
Read More
Silent Install Adobe Shockwave Player 12 and disable update
In this tutorial will explain how to silent install Adobe Shockwave Player 12 msi and disable auto update. The command will uninstall older ...
Read More
Silent Install Google Chrome MSI, Silent Uninstall and Disable Auto Update
This tutorial will explain how to silent install Google Chrome MSI and disable auto update. The command will uninstall older version of ...
Read More
Silent Install Adobe Reader 11 and DC – msi and exe – disable update
In this tutorial will explain how to silent install Adobe Reader version 11 and DC. We will user both version "msi" ...
Read More
Silent Install Mozilla Firefox msi and exe file – Including Silent Uninstallation
This tutorial will explain how to silent install Mozilla Firefox. We will use MSI and EXE files to perform a silent ...
Read More
Skype Silent Install Msi and disable updates
In this tutorial will explain how to silent install skype  and disable auto update. The command will uninstall older version of Skype and ...
Read More
Filezilla Silent Install msi and exe version
Filezilla silent install tutorial will explain how to perform a silent installation of application. We will explain methods, silent install ...
Read More
Silent install VLC Media Player
In this tutorial will explain how to silent install VLC Media Player. We will explain both methods for exe and ...
Read More
Notepad++ silent install exe and msi version – Command Line
Notepad++ silent install is the new article from a series of silent installations. Notepad++ as free software has two main ...
Read More

Batch File Solutions

How to list files in cmd – Command Prompt – Windows 10
Whenever you want to search and make a list of all files on a specific folder, you used the windows ...
Read More
Batch rename multiple files in folder – CMD script – Bulk Method – Win 10
The following article will teach how to rename multiple files in a folder with the bulk method using Command Line ...
Read More
Batch script rename file using Command Line (CMD) & PowerShell – Windows 10
The following article will use the “rename” or “ren” command to rename the file using a command prompt. Also, we ...
Read More
Change extension of multiple files at once – CMD batch file
The following article will teach the methods to change the extension of multiple files at once using command prompt and ...
Read More
How to delete registry key with command line | PowerShell | Batch
The following article is the third of series about registry and working on it through command line (CMD) and PowerShell ...
Read More
How to add registry key & values with CMD | PowerShell | Batch
The registry is the place where most of the applications store the settings but not only. Used also from the ...
Read More
Unmap Network Drive CMD – (Batch file) – net use delete command
After we posted the methods to map network drive using cmd commands we come this time with the method to ...
Read More
Map Network Drive cmd (batch file) – net use user password
This article will focus on another way to map a network drive on your computer instead of from the explorer ...
Read More
How to Find Large Files on Windows 7 & 10 – CMD Forfiles Command
If the capacity of your hard drive is running low, it is time to clean off some files and to ...
Read More
CMD Script to check disk space on windows and multiple remote servers
The following article will provide you script to check disk space. The Script monitor space on windows and multiple remote ...
Read More

Get IT Solutions

How to do IT

About Us

Get IT Solutions is a personal blog, which is managed to guide people for various topic.

Second Menu

  • Donate
  • About Us
  • Contact Us
  • Privacy Policy

What Will You Find

Automation is our area of writing where are included scripts, batch and various tips to automate your daily job.
Copyright © 2025 Get IT Solutions