I ran into an issue where I’d be forced to add my domain to the end of every server I SSH’ed into. Basically, DNS search domains stopped working. Here’s how to fix it.

Make a backup of your com.apple.mDNSResponder.plist file

$ sudo cp /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist ~/com.apple.mDNSResponder.plist.original

Edit your com.apple.mDNSResponder.plist file

$ sudo vi /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Add the below RED line.

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

Reload your com.apple.mDNSResponder.plist file

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

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.