Terminal/Safari Cannot Resolve Host But Chrome Can Connect
Your launch daemon com.apple.mDNSResponder.reloaded is not loaded properly.

You can check this by entering sudo launchctl list | grep DNS.

The result should yield something like this:

-   0   com.apple.mDNSResponderHelper.reloaded
108 0   com.apple.mDNSResponder.reloaded


108 is the pid and should differ on your system.



Check your com.apple.mDNSResponder.plist for errors with:

cat /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist


It should look like this:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;com.apple.mDNSResponder.reloaded&lt;/string&gt;
    &lt;key&gt;OnDemand&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;InitGroups&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;UserName&lt;/key&gt;
    &lt;string&gt;_mdnsresponder&lt;/string&gt;
    &lt;key&gt;GroupName&lt;/key&gt;
    &lt;string&gt;_mdnsresponder&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/sbin/mDNSResponder&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;MachServices&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;com.apple.mDNSResponder&lt;/key&gt;
        &lt;true/&gt;
            &lt;key&gt;com.apple.mDNSResponder.dnsproxy&lt;/key&gt;
            &lt;true/&gt;
    &lt;/dict&gt;
    &lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Listeners&lt;/key&gt;
        &lt;dict&gt;
            &lt;key&gt;SockFamily&lt;/key&gt;
            &lt;string&gt;Unix&lt;/string&gt;
            &lt;key&gt;SockPathName&lt;/key&gt;
            &lt;string&gt;/var/run/mDNSResponder&lt;/string&gt;
            &lt;key&gt;SockPathMode&lt;/key&gt;
            &lt;integer&gt;438&lt;/integer&gt;
        &lt;/dict&gt;
    &lt;/dict&gt;
    &lt;key&gt;POSIXSpawnType&lt;/key&gt;
    &lt;string&gt;Interactive&lt;/string&gt;
    &lt;key&gt;EnablePressuredExit&lt;/key&gt;
    &lt;false/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Remove the lines &lt;key&gt;com.apple.mDNSResponder.reloaded&lt;/key&gt; and the immediately following &lt;false/&gt; or &lt;true/&gt; from the file disabled.plist by editing it with

sudo nano /private/var/db/com.apple.xpc.launchd/disabled.plist


You may have to disable SIP to do so!

Remove the mDNSResponder daemon from the launchctl database with:

sudo launchctl remove com.apple.mDNSResponder.reloaded


Re-add it with 

sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist


Reboot.