Knowledgebase: How-To
Flush Your DNS
Posted by - NA - on 28 July 2009 04:08 PM

Most operating systems and DNS clients will automatically cache IP Addresses and other DNS results to speed up subsequent requests to the same hostname. Sometimes bad results will be cached and therefore need to be cleared from the cache in order for you to communicate with the host correctly (i.e. when you're trying to go to the domain, it's actually pulling up an old IP address that's cached on your own computer instead of looking for a new one and finding the correct record). All major operating systems allow you to force this process, outlined below are the common steps you will need to follow in order to flush your DNS cache.

​Perform the following tasks, according to your Operating System, to flush DNS for your computer.

Windows

To flush DNS cache in Microsoft Windows (Win 7/Vista, Win XP, Win ME, Win 2000):

  1. Go to the Start menu, click Run and type 'cmd'

  2. In the command prompt type 'ipconfig /flushdns' 

Done! You Window DNS cache has just been flushed.

Linux

To flush the DNS cache in Linux:

  1. Type '/etc/rc.d/init.d/nscd restart' in your terminal window

  2. Run that command

Done! Your Linux DNS cache has just been flushed.

Mac OSX

To flush the DNS cache in Mac OSX:

  1. Type 'dscacheutil –flushcache' in your Terminal window and press the Enter key

Example: user$ dscacheutil -flushcache 


Done! Your OS X DNS cache has been flushed.

Mac OSX Leopard

To flush the DNS cache in Mac OS X Leopard:

  1. Type 'dscacheutil -flushcache' in your Terminal window

Example: bash-2.05a$ dscacheutil -flushcache

Done! Your OS X Leopard DNS cache has been flushed.

Mac OSX Yosemite

(Please Note: If you are using Yosemite 10.10.4 or 10.10.5, these instructions won't work. Please use the instructions for flushing your DNS on either Mac OSX or Mac OSX Leopard.)
 

To flush the DNS cache in Mac OS X Leopard you need to use the Terminal to reset cache. You can find the Terminal app by searching for it from Spotlight. To completely clear all DNS caches, target both MDNS (Multicast DNS) and UDNS (Unicast DNS) with two different commands. 

Clear MDNS Cache:

  1. Type 'sudo discoveryutil mdnsflushcache' in your terminal window

  2. Press the Return key

  3. Enter the admin password when requested

Clear UDNS Cache:

  1. Type 'sudo discoveryutil udnsflushcaches' in your terminal window

  2. Press the Return key

  3. Enter the admin password when requested

Done! Your OS X Yosemite DNS cache has been flushed.



Attachments 
 
 screen_shot_2014-08-08_at_3.35.26_pm.png (41.84 KB)
 flushdnswin.png (12.33 KB)
(354 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
Help Desk Software by Kayako fusion
ERROR: This domain name (kb.asmallorange.com), does not match the domain name in the license key file help.asmallorange.com.

For assistance with your license, please contact the Kayako support team: https://support.kayako.com