Sunday, 24 June 2012

Flush the DNS cache on OS X, Windows & Linux

DNS is the system that coverts a domain (jameskrawczyk.co.uk) to an IP address that a computer can understand. In order to speed up lookups systems will cache the resulted IP address as a local lookup is much faster than having to query a remote server.

This can be a problem however, if you have switch a domain to point to a new server and the DNS servers have updated but your machine is caching the old address. The simple fix for this is to flush your DNS cache.

The method for this varies slightly depending on operating system but in each case it's incredibly ease.

If your using Windows,

Go to Start > Run  and enter cmd, when the command prompt dialog appears enter ipconfig /flushdns

If your using Mac OS X

10.4

Run Terminal and then enter lookupd -flushcache

10.5+

Run Terminal and then enter dscacheutil -flushcache 

If your using Linux


Run a Terminal window and then enter cd /etc/rc.d/init.d then ./nscd restart





No comments:

Post a Comment