Flush Dns Cache for Single Domain

I was working on the site today and ran into an issue: Our caching DNS server (Windows 2008) was holding on to the old webserver’s IP. This wasn’t a problem for me locally as I used the old hosts file trick to point to the new server. However, this meant I couldn’t show other folks the site until either the cache was completely flushed or the record expired.

A little googling later, and I found this little command from ServerFault.

dnscmd dnsserver.local /NodeDelete ..Cache whatever.com [/Tree] [/f]
/tree    Specifies to delete all of the child records.
/f       Executes the command without asking for confirmation.

This allows you to clear just a small portion of the cache, as you define it. Pretty handy!

Avatar
Derek Murawsky
IT Architect & Homesteader
comments powered by Disqus
Next
Previous