Flushing DNS


Overview


Operating systems cache or store away IP addresses for future use. It does so to speed up the connection time as fetching data from the DNS (domain name server) every time you connect to the network requires a lot more time and resources than necessary.

However, when the IP addresses do change, the operating system will still try to pull the IP address from its stash rather than from the DNS. Flush DNS command removes this stored cache and forces your device to retrieve the information from the DNS again. The Winsock reset restarts the communication required between your device and the network. 

Critical Concepts


Steps to Take


Windows

  1. On the taskbar search, type "Command Prompt."
  2. Right click on Command Prompt and press "run as administrator."
  3. When asked whether to allow Command Prompt to make changes to your computer, select Yes.
  4. Open Command Prompt
  5. Type the command ipconfig /flushdns then press enter

    Screenshot: Windows command prompt with ipconfig / flushdns command

  6. Type the command ipconfig /registerdns then press enter

    Screenshot: Windows command prompt with ipconfig / registerdns command

  7. Type the command ipconfig /release then press enter

    Screenshot: Windows Command Prompt with ipcongif / release command

  8. Type the command ipconfig /renew then press enter

    Screenshot: Windows Command Prompt with ipconfig / renew command

  9. Type the command netsh winsock reset then press enter

    Screenshot: Windows command prompt with netsh winsock reset command

  10. Restart the computer

Mac

  1. Close all browser windows.
  2. Open Terminal. You can do this by pressing the Command key + Space Bar at the same time to open your Spotlight Search. Or click the magnifying glass in the top right hand corner. Then type "terminal." Click on Terminal. 

    Screenshot: Mac Spotlight Search to open Terminal

  3. In the Terminal window, type the corresponding command for your Mac OS X version:

    • OS X 10.11-10.15 (El Capitan, Sierra, High Sierra, Mojave, Catalina): sudo killall -HUP mDNSResponder

      Screenshot: Mac terminal flush DNS command for MacOX 10.11-10.15

    • OS X 10.10 (Yosemite): sudo discoveryutil mdnsflushcache

      Screenshot: Mac terminal flush DNS command for MacOX 10.10

    • OS X 10.7 - 10.9 (Mavericks, Mountain Lion, and Lion): sudo killall -HUP mDNSResponder

      Screenshot: Mac terminal flush DNS command for MacOX 10.7-10.9

    • OS X 10.6 and older: sudo dscacheutil -flushcache

      Screenshot: Mac terminal flush DNS command for MacOX 10.6 and older

  4. Press Enter, then enter your password to finish clearing the DNS cache. 

If you still have questions or need additional assistance, please submit a ticket or call the ITS Service Desk at (858) 246-4357