How to: Clear DNS Cache on a MAC

  • Time
  • Show
Clear All
new posts
  • Aze
    Junior Member
    • Mar 2004
    • 27

    How to: Clear DNS Cache on a MAC

    Hey all,
    Just got done troubleshooting - thought I'd share what I learned.

    I went to log on to one of my sites ( ) and I was getting an error page saying that my browser couldn't connect with the server, i.e; there was nothing there. Other sites of mine worked fine, but for some reason this one didn't. The account was up on the server, other people could see it, I could view all the contents and files in my FTP client or by going threw but for some reason it wasn't showing up for me when I went to the actual address.
    After some time, and a trouble-ticket which was answered very timely (thanks guys) I found out that it was because my machine (dual 1.8 G5 Mac with OS X) was still trying to find on it's old IP address, from before the server move that happened this past week.

    Incase something like this happens to you, on your mac, this is how you get your machine to erace it's cache of DNS addresses.

    (1). Go to; Finder
    (2). Go to; 'Applications'
    (3). Go to; 'Utilities'
    (4). Click on 'Terminal'
    (5). Enter in this line; " lookupd -flushcache "
    (6). Click 'return'

    You wont get any notice that the cache has been flushed, the only way you'll be able to tell if the command ran well is if another line like 'computername:~username$' shows up.

    Then you just close and re-open your browser.

    Worked for me.
  • Aze
    Junior Member
    • Mar 2004
    • 27

    P.S; this is not harmful to your machine. It just makes it lookup the DNS addresses of websites. Just as if you had never been to the site before.