Flush the local DNS cache on a Mac to clear cached DNS records.
Use the following Terminal command to reset the DNS cache:
sudo discoveryutil mdnsflushcache
You can use the same command to flush the DNS cache on Mac OS X Mavericks, Mountain Lion, and Lion:
sudo discoveryutil mdnsflushcache
Simply open the Terminal and run the appropriate command based on your Mac OS version to clear the DNS cache.