DNS

How to Flush DNS Cache

How to flush DNS on various platforms

Introduction

This tutorial will show how to flush DNS using various platforms. By the end, you’ll be able to clear DNS cache on Windows, Mac, and Linux machines.

Bad or outdated DNS resolver cache will display incorrect information or an error when you access websites. The following can occur due to recent DNS changes. Therefore, it is important to know how to flush DNS cache and tackle this issue with ease.

How to Flush DNS on Windows

Firstly, lets check how we can flush DNS on Windows machines. The following method will let you clear DNS cache on Windows XP; Vista; 7; 8; 8.1; 10.

Step 1 — Launching Windows command prompt console

Press the Windows+R key combination in order to open the Run dialog box. Type the following command and click the OK button:

cmd

Opening Windows command prompt to flush DNS cache

This will open a command prompt window.

Ready to flush DNS using Windows

Step 2 — Flushing DNS

Use this command to clear DNS resolver cache on your computer:

ipconfig /flushdns

Wait a few moments and you’ll see a confirmation that DNS resolver cache has been flushed.

Successful Flush DNS on Windows

How to Flush DNS on Linux

Clearing DNS cache or Linux is a pretty straightforward process. The syntax to flush DNS may vary depending on what OS you’re running.

Ubuntu Linux

Open up your terminal and execute the following command:

sudo service network-manager restart

Flush DNS on Ubuntu Linux via Terminal

Other Linux Distributions

If you’re any other linux distribution, this command will do the trick:

sudo /etc/init.d/nscd restart

Flush DNS on any Linux OS via Terminal

How to Flush DNS on Mac

Lets see how we can flush DNS on Apple OS. The command to clear DNS cache will differ depending on your OS version.

Looking for a better way to host your website?

Transfer your website to the fastest web hosting platform with 24/7 dedicated support.

Mac OS Sierra

To flush DNS on this Apple OS version, navigate Application  Utilities › Terminal and enter this command:

sudo killall -HUP mDNSResponder

Flush DNS on Mac OS x Sierra using Terminal

Mac OS X El Capitan

If you’re a user of this OS, the same process will work. Open Application  Utilities › Terminal and enter:

sudo killall -HUP mDNSResponder

Flush DNS on Mac OS X El Capitan using Terminal

Mac OS X Yosemite

Clear DNS cache on this OS by going to Application  Utilities › Terminal and input:

sudo discoveryutil udnsflushcaches

Flush DNS on Mac OS X Yosemite using Terminal

Mac OS X Mavericks

To erase outdated DNS cache, go to Application  Utilities › Terminal and execute:

sudo killall -HUP mDNSResponder

Flush DNS on Mac OS X Mavericks using Terminal

Mac OS X Mountain Lion

The users of this Mac OS version can proceed to Application  Utilities › Terminal and flush DNS with this command:

sudo killall -HUP mDNSResponder

Flush DNS on Mac OS X Mountain Lion using Terminal

Mac OS X Lion

Head over to Application  Utilities › Terminal use the following syntax:

sudo killall -HUP mDNSResponder

Flush DNS on Mac OS X Lion using Terminal

Mac OS X Snow Leopard

If you are running this version, jump to Application  Utilities › Terminal and input:

sudo dscacheutil -flushcache

Flush DNS on Mac OS X Snow Leopard using Terminal

Mac OS X Leopard and below

You may clear DNS resolver cache on this OS by going to Application  Utilities › Terminal and entering:

sudo lookupd -flushcache

Flush DNS on Mac OS X Leopard or lower using Terminal

Conclusion

Congratulations! By completing this tutorial you have learned how to flush DNS on Windows, Linux, and Mac platforms. You may now clear DNS resolver cache by using flush DNS commands and ensure that you get the latest entries. Keep in mind that browser cache may also be the cause of incorrectly displayed web pages. Check out this tutorial on how to clear it!

Have any tips, tricks, or ideas to share? Let us know in the comments below!

2 Comments

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

More in DNS
How to Check Domain’s Nameservers

Close