Alternative to AlwaysAppendSearchDomains on Yosemite? [duplicate]

Solution 1:

I found the answer as I posted this:

To enable mDNSResponder, edit /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist and remove the lines

<key>Disabled</key>
<true/>

Then add -AlwaysAppendSearchDomains to the arguments list further down in the same file:

<string>_mdnsresponder</string>
<key>ProgramArguments</key>
<array>
    <string>/usr/sbin/mDNSResponder</string>
    <string>-AlwaysAppendSearchDomains</string>
</array>

Finally run

$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

You can then verify mDNSResponder is running:

$ ps ax | grep -i dns | grep -v grep
10456   ??  Ss     0:00.44 /usr/sbin/mDNSResponder -AlwaysAppendSearchDomains

Subdomains of search domains can then be resolved.