DevOps Zone is brought to you in partnership with:

Alex Holmes is a senior software engineer with over 15 years of experience developing large scale distributed Java systems. For the last four years he has gained expertise in Hadoop solving Big Data problems across a number of projects. He is the author of "Hadoop in Practice", a book published by Manning Publications. He has presented at JavaOne and Jazoon and is currently a technical lead at VeriSign. Alex is a DZone MVB and is not an employee of DZone and has posted 23 posts at DZone. You can read more from them at their website. View Full User Profile

OSX, Chrome, and DNS

01.22.2013
| 2925 views |
  • submit to reddit

Everything in getting my personal site setup went fairly smoothly, including updating my registrar’s DNS records to point my domain name at my hosting provider. Being an impatient sort, I didn’t want to have to wait for the TTL on my domain name to expire, so I ran a dig request to see if my registrar had pushed through the change:

shell$ dig grepalex.com

;; ANSWER SECTION:
grepalex.com.		3600	IN	A	66.216.100.140

Indeed they had! Next up was trying to hit my website from my browser. When I did that however, Chrome was showing the my registrar’s advertising content. A few pokes around led me to Chrome’s web page which lets you invalidate its DNS cache:

chrome://net-internals/#dns

However even after invalidating Chrome’s cache it still showed the content from the registrar. The cool thing about Chrome’s internal page is that it actually shows you the cached IP address, which indeed was still the old value. Clearly the OSX DNS client was performing some additional caching. After some more digging around I found the (Mountain) Lion-specific command which did indeed successfully clean OSX’s cache:

shell$ sudo killall -HUP mDNSResponder

Hurray!

Published at DZone with permission of Alex Holmes, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)