Anytime you visit a website or do any other kind of DNS (Domain Name System) lookup, the IP address conveniently gets cached. Well today a Graphic Designer I was working with to finish up a site, just couldn’t access the site to see that changes.
He could access every other domain on ether of our servers, just not our staging domain. I remote connected to his computer, and ping’d first our primary domain and got the expected IP in return, then I ping’d our staging domain and got ‘10.1.1.3′ which was the machine I was using. I reset the DHCP, with no help. So I figured it was a DNS Issue.
Flushing your DNS cache in Mac OS X is actually really easy, and there are two different commands to use, one for Leopard and for Tiger. Depending on your version of OS X, open your Terminal and follow the appropriate directions below:
Flush your DNS Cache in Mac OS X 10.5 Leopard
Launch Terminal and issue the following command:
dscacheutil -flushcache
All done, your DNS has been flushed.
On a side note, the dscacheutil is interesting in general and worth taking a look at, try the -statistics flag instead for some stats.
Flush your DNS Cache in Mac OS X 10.4 Tiger
Type the following command in the Terminal:
lookupd -flushcache
That’s it, that’s all there is to it. Now your DNS settings should be as you intended them to be.
Related posts:
- Installing PHP5 and mySQL on Mac OSX Leopard
- Changing the RSS refresh rate in Apple Mail
- Hack Safari to open links in new tabs, not new windows
- Force Eject a CD/DVD in Apple Leopard
- Virtual Web Hosting on OSX Leopard
