If you are having issues with DNS in OS X Yosemite, you're not alone. Me too.
A less intense fix for the problems (that generally works for me) comes from these two articles on SE:
DNS doesn't work properly in OS X Yosemite
Yosemite Cannot Resolve Domain Names
Solution summary:
- Flush DNS caches
sudo discoveryutil udnsflushcaches
sudo discoveryutil mdnsflushcache
- Unload/reload discovery daemon (discoveryd replaces mdnsresponder)
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
If that doesn't work, then:
- Backup and then delete the contents of
/Library/Preferences/SystemConfiguration/
- You will have to reconfigure your network interfaces in the network control panel
- As suggested here on the Apple forums