MacOS – How to “flush” the DNS/web services so that it sees the updated website like everyone else


On all my roommates computers my website that I recently changed where the DNS points to actually points to the right location, and when you load it all is well.

However for myself, when I load the website in Safari or Chrome or what have you, it always presents an error from the old host (which was the whole reason I moved to a new host), which I assume is because of some cached DNS issue where it's still looking for the wrong location.

I tried: sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; to no avail, it still loads the old site.

Any suggestions on how to get it to load the correct webpage?

Best Answer

if you go into a terminal window and type:

ping [DNS name of site]

What does it give you? Now do the same on your roommate's PCs from a command prompt.

if you do it with a hostname rather than IP address ping gives you the IP address and the FQDN of the site. They should be the same on both/all computers. If they are then Safari/Chrome has cached some data and is stubbornly holding onto it. So empty the caches on both and try again.

If it is different on your Mac then there is a cache somewhere that will not reset. You could try the command again, followed by a reboot and possibly even one of the cleaning utilities (like Onyx) followed by a reboot and see what that does.