1. Home
  2. Knowledge Base
  3. Internet
  4. How to clear DNS caches
  1. Home
  2. Knowledge Base
  3. Network
  4. How to clear DNS caches

How to clear DNS caches

Computer operating systems can persistently maintain DNS cache after consistently connecting to a site or accessing a domain (hostname). This can produce errors when accessing domain related resources, such as website and email, when your DNS has been updated and IP addresses are changed.

To address this issue, close the programs (browsers, mail clients, etc.) restart your computer and use the following instructions to clear your DNS cache.

 

On PC/Windows:

The “IPConfig” program in Windows displays current TCP/IP network configuration values and displays, registers, or flushes Domain Name System (DNS) names. To access IPConfig you’ll need to open Command Prompt:

– Programs -> Accessories -> Command Prompt
– or Start -> All Programs -> Accessories -> Command Prompt
– or at the “Run” menu type “cmd” and [Enter]

At the command prompt enter the following syntax:

ipconfig /flushdns

(if done successfully it will respond with “Successfully flushed the DNS resolver Cache””)

To verify your computer is “seeing” the correct IP address for your resource you can then type “ping www.yourdomain.com” and see if a Ping returns the correct IP address.

NOTE: in Windows Vista and “UAC” permissions enabled you might get a prompt that says: “the requested operation requires elevation” This means the cmd prompt must be run “as administrator”. Before launching the cmd prompt Right-click on its icon and select “Run as administrator”.

 

On Mac OSX:

Open the Terminal application and use the command:

To flush the cache in older Mac OS X, issue this command from a terminal window:
lookupd -flushcache

in Mac OS X v10.6
Use the following Terminal command to reset the DNS cache:
sudo dscacheutil -flushcache

in OS X Mountain Lion or Lion 10.7 – 10.8
Use the following Terminal command to reset the DNS cache:
sudo killall -HUP mDNSResponder

in OS X Mavericks 10.9
Use the following Terminal command to reset the DNS cache:
dscacheutil -flushcache; sudo killall -HUP mDNSResponder

in OS X Yosemite 10.10
Use the following Terminal command to reset the DNS cache:
sudo discoveryutil udnsflushcaches

in El Capitan 10.11
Use the following Terminal command to reset the DNS cache:
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; you are flushed

~~~~~~~~~~~~~~~~~~~~~~~~
NOTE: For other command line parameters that deal TCP/IP DNS issues under Windows 2000 XP see the Microsoft Support KB article:
http://support.microsoft.com/kb/169790

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact E Street Support