How to flush DNS cache on Mac OS 10.5,6

Sometimes adding a new subdomain to a known host for development means waiting for your local DNS cache to clear before your computer will be able to load the new subdomain's content into a browser. This may have to do with the fact that your local DNS caches entries only allows entries to update once they expire. You may not wish to wait around for that.

To force your local machine's DNS cache to clear, do the following:

  1. Click Applications.
  2. Click Utilities.
  3. Double-click the Terminal application.
  4. Type the following command: sudo dscacheutil -flushcache