Contents that posted a long time ago may be obsolete and may not reflect my current opinion.

sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache