Mac OSX uses a time-saving DNS cache. It’s generally invisible ot the user and helps speed things up a bit. If you are setting up a new WordPress self hosted site (or other CMS like Drupal) this can prevent you from being able to conenct to your new site – you might have to wait many hours after configuring that new DNS nameserver. This is more of an issue when moving a site from one host to another than setting up a new site.
The cache will still serve the old ip address of the site, even if the DNS server already has the new ip address in its configuration. To override the cache, and request the latest information with the authoritive DNS server, you can flush the DNS cache.It will quickly rebuild itself
To flush (or empty/delete) the DNS cache, open a Terminal window and enter the following command: sudo dscacheutil -flushdns
note that “sudo dscacheutil -flushdns” does not work.
the old mac os command was
sudo lookupd -flushcache
but you will get a response of:
sudo: lookupd: command not found
with any Tiger OS (or older).
In Leopard, dscacheutil replaces most of lookupd‘s functionality. It allows you to do many things: flush or view caches, view Directory Service configuration information, and evaluate cache statistics.