I experienced this problem when I upgraded to Apple MAC OS X Yosemite 10.10 you also need to ensure you are running 10.10.1 Update DNS Append Search failed to work. Example if you have your own domain as “company.net”, and you want to ping a host called “demo.company.net”, you can just use the (non-qualified) hostname “demo”.
If you have a host called app01.corp.company.net, weather or not you can use “app01.corp” as a shortname depends on how your operating system is configured.
In Mac OSX (Yosemite), the DNS resolution won’t work as it doesn’t append the search domain. If the hostname you try to use has a . in it, OSX will always assume it’s a FQDN, and won’t try to append your default search domain.
There is a easy way to fix this behaviour follow the instructions below and have fun.
Here we go:
- Backup /System/Library/LaunchDaemons/com.apple.discoveryd.plist
Shell123sudo cp /System/Library/LaunchDaemons/com.apple.discoveryd.plist ~/com.apple.discoveryd.plist.backup
Edit com.apple.discoveryd.plist to include the “–AlwaysAppendSearchDomains” setting. You can use any text editor you like, just don’t forget to use elevated privileges via sudo. If you know vi(m), or nano:
Shell123sudo vim /System/Library/LaunchDaemons/com.apple.discoveryd.plist
- You need to add
–AlwaysAppendSearchDomainsto the ProgramArguments array. In my copy, it was around line 11. Eg:xml thingXHTML123456789101112131415<key>ProgramArguments</key><array><string>/usr/libexec/discoveryd</string><string>--udsocket</string><string>standard</string><string>--loglevel</string><string>Basic</string><string>--logclass</string><string>Everything</string><string>--logto</string><string>asl</string><string>--AlwaysAppendSearchDomains</string></array>
- Reload the discoveryd service:
Shell1234sudo launchctl unload /System/Library/LaunchDaemons/com.apple.discoveryd.plistsudo launchctl load /System/Library/LaunchDaemons/com.apple.discoveryd.plist
Append DNS Broken in OS X El Captain
here’s how to fix it:
sudo defaults write /Library/Preferences/com.apple.mDNSResponder.plist AlwaysAppendSearchDomains -bool YES
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist