Clear DNS Cache | PC Help Forum
  1. Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Virus removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
    Dismiss Notice

Clear DNS Cache

Clear the DNS cache in Mac OS X and MacOS

  1. jmarket
    In Windows and Linux, clearing the cache is pretty straightforward. But in OS X, it's not quite that simple. Below is a guide on how to accomplish this.

    1.) Open Terminal.


    2.) For OS X v10.10.4 and above (Yosemite), you can run

    Code:
    killall -HUP mDNSResponder
    
    and it'll reset the cache for you.

    3.) For OS X v10.10 through 10.10.3 (Yosemite), use

    Code:
    discoveryutil mdnsflushcache
    
    4.) For OS X v10.9.5 and earlier (Mavericks, Mountain Lion, and Lion), use

    Code:
    killall -HUP mDNSResponder
    
    5.) For OS X v10.5.2 through v10.6.8 (Snow Leopard), use

    Code:
    dscacheutil -flushcache
    
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    If you don't want to manually enter these commands, you can instead use a Bash script to accomplish this. Use the following script

    Code:
    alias flushdns="curl -Ls 'https://raw.githubusercontent.com/OwlReporter/OwlMac/master/Scripts/FlushDNS.sh' | sudo sh"
    
    and then you can use:

    Code:
    flushdns
    
    to flush the DNS. This code will fetch the latest bash script in case a new command is needed in future releases of OS X to flush the DNS.