Clearing Local DNS Cache

How-To Clear Your Local DNS Cache

If you have recently made changes to the DNS records for your domain you most likely want to see the results. In order for your system to recognize updates you must often clear the local DNS resolver cache. Depending on where your DNS is hosted the amount of time it takes for your changes to propagate worldwide will vary. If you use Cloudflare your DNS updates will instantly propagate worldwide.

macOS High Sierra 10.13, macOS Sierra 10.12 and OSX El Capitan 10.11

Open up your Terminal Applications/Utilities or iTerm if you prefer and issue the following command:

sudo killall -HUP mDNSResponder

If you want to have a little fun with this then you can use the following command to do the same thing with an added verbal confirmation from your Mac.

sudo killall -HUP mDNSResponder; say The DNS cache on your Mac has now been flushed

Microsoft Windows (All Versions)

Open up your Command Prompt and issue the following command then press enter:

ipconfig /flushdns

Linux

For CentOS, RedHat and Fedora systems, open your Terminal and issue the following command:

sudo systemctl restart nscd.service

The NSCD daemon may or may not be installed by default. To install it manually use the following:

sudo yum install nscd

For Ubuntu and other Debian based systems, open your Terminal and issue the following command:

sudo service nscd restart

The NSCD daemon may or may not be installed by default. To install it manually use the following:

sudo apt-get install nscd

I hope you found this post useful and your DNS is resolving as it should. Thanks for reading!

DIGITAL PCI © 2018