How do I flush DNS?

Flush DNS in Windows

The following methods allow you to remove old and inaccurate DNS information that may result in 404 or other errors.

Windows 8, 8.1 and 10

  1. On your keyboard, press Win+X to open the WinX Menu.
  2. Right-click Command Prompt and select Run as Administrator.
  3. Enter your password if prompted.
  4. Run the following command at the command prompt
ipconfig /flushdns 

Windows 7

  1. Click Start.
  2. Enter cmd in the Start menu search text box.
  3. Right-click Command Prompt and select Run as Administrator.
  4. Enter your password if prompted.
  5. Run the following command:
ipconfig /flushdns 

Windows XP, 2000, or Vista©

  1. Click Start.
  2. On the Start menu, click Run....
    • If you do not see the Run command in Vista, enter run in the Search bar.
  3. Run the following command:
ipconfig /flushdns 

The above command will completely flush the DNS, deleting any incorrect entries too. You can also use the command ipconfig /displaydns to view the DNS resolver cache.

Flush DNS in Mac OSX

To clear your DNS cache if you use MacOS X, start by opening Terminal by performing the following steps:

  1. Click Applications.
  2. Click Utilities.
  3. Double-click Terminal.
  4. Run the applicable below command:

OS X 10.10 Yosemite

sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches;say flushed

OS X 10.9 Mavericks

sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder

OS X 10.7 Lion and 10.8 Mountain Lion

sudo killall -HUP mDNSResponder

OS X 10.5 Leopard and 10.6 Snow Leopard

sudo dscacheutil -flushcache

OS X 10.3 Panther and 10.4 Tiger

sudo lookupd -flushcache

Flush DNS in Linux

In Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon.

sudo /etc/init.d/nscd restart
Was this answer helpful? 73 Users Found This Useful (131 Votes)