You are viewing the legacy StackPath SecureCDN Help Center. Please use support.stackpath.com if you signed up after July 1, 2018 or log in through control.stackpath.com

StackPath Support

How To Flush DNS Cache

Most major operating systems will cache DNS results for specific domains to greatly enhance DNS lookup times. Occasionally, an OS will cache bad results which will in cause incorrect content to be returned or not return anything at all. Luckily most operating systems offers a way to flush DNS to clear any bad records. Below is a list of most major operating systems with specific instructions for clearing the DNS cache: 

Apple OS X

Flushing the DNS in Mac OS X is an easy process, however steps vary depending on the version of OS being used. 

macOS Sierra

If you are running Mac OS X 10.12, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo killall -HUP mDNSResponder

Mac OS X El Capitan

If you are running Mac OS X 10.11, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo killall -HUP mDNSResponder

Mac OS X Yosemite

If you are running Mac OS X 10.10, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo discoveryutil udnsflushcaches

Mac OS X Mavericks

If you are running Mac OS X 10.9, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo killall -HUP mDNSResponder

Mac OS X Mountain Lion

If you are running Mac OS X 10.8, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo killall -HUP mDNSResponder

Mac OS X Lion

If you are running Mac OS X 10.7, you need to follow the below steps:

  1. Open up the command terminal.
  2. Run the command sudo killall -HUP mDNSResponder

Mac OS X Snow Leopard

If you are running Mac OS X 10.6, you need to follow the below steps:

  1. Open up a command terminal.
  2. Run the command sudo dscacheutil -flushcache

Mac OS X Leopard and below

If you are running Mac OS X 10.5.1 or below, you need to follow the below steps:

  1. Open a command terminal.
  2. Run the command sudo lookupd -flushcache

Microsoft Windows

Windows 10

 Due to system security permissions, you must ensure that you run the command prompt as an administrator user.

  1. Navigate to  the Windows 10 desktop.
  2. Right click on the start menu and choose Command Prompt (Admin) from the menu.
  3. Type in the command ipconfig /flushdns

Windows 8 / Windows 8.1 

  1. Navifate to  Windows 8 Start Screen.
  2. Type in  cmd and the Windows search bar will appear on the right hand side with search results.
  3. Right click on Command Prompt and click Run as administrator
  4. Type in the command ipconfig /flushdns

Windows Vista / Windows 7

  1. Click the start button and navigate to the command prompt (Start > All Programs > Accessories > Command Prompt)
  2. Make sure that you right click on the command prompt application and choose "Run as Administrator"
  3. Type in the command ipconfig /flushdns

Linux

If you are running the nscd Name Service Cache Daemon and wish to flush your DNS cache, then you will need to do the following.

  1. Open up a command terminal (either as root or run step 2 with sudo).
  2. Run the command /etc/init.d/nscd restart
Return to top