Clear the local DNS Cache in OSX 10.10 Yosemite, Linux and Windows

When you see something wrong on your website, like getting worry if server not found or the site isn’t loading the way it is. This is happening when Domain Name Server is changed or by connecting into network that has DNS management system. It is time to clear your DNS Cache.

The DNS store domain and IP address on your local network cached and you can refresh it by flushing the cache.

How to clear the local DNS cache on terminal or command line?

OSX 10.10

sudo discoveryutil udnsflushcaches

OSX 10.9

dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OSX 10.7 – 10.8

sudo killall -HUP mDNSResponder

OSX 10.5 – 10.6

sudo dscacheutil -flushcache

Windows

ipconfig /flushdns

Linux (depending on what you’re running)

/etc/init.d/named restart
/etc/init.d/nscd restart

DNS cache is periodically flushing but it depends on how it is configure in network settings. You can use this command if you want to flush it now!

I experience this when I transfer hosting and the dns change, while my local dns cache are still having the old data, it could load the page or the url can’t be resolve. I have to ask my chat make to check if the website is online and yes it was. So its time to flush my local dns to resolve the url.

You can also flush dns in this kind of errors!

Error 1001 Ray ID: 1d74987af9ca122b • 2015-04-15 03:35:50 UTC

DNS resolution error

What happened?

You've requested a page on a website (www.yourwebsite.com) that is on the CloudFlare network. CloudFlare is currently unable to resolve your requested domain (www.advanceidea.org). There are two potential causes of this:

  • Most likely: if the owner just signed up for CloudFlare it can take a few minutes for the website's information to be distributed to our global network.
  • Less likely: something is wrong with this site's configuration. Usually this happens when accounts have been signed up with a partner organization (e.g., a hosting provider) and the provider's DNS fails.

dlysen: I have a dream too! It’s about making a difference within me and to help others to do the same. That’s the kind of dream that gets better the more people you share with it. And I found a whole bunch of people who share the same dream, and that kind of makes us like a family. Follow me on Google+
Related Post