I have this problem as well, and the "sudo discoveryutil mdnsactivedirectory yes" command does not fix it.
I have an added layer in that I'm using a VPN (Cisco AnyConnect), so the VPN software probably makes its own changes to how the resolver is working.
I can temporarily fix this using:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
Within a few minutes, I'm back to broken name resolution. Maybe if I just leave discoveryd off? I suppose then I have to live without AirPlay and other goodies.
I upgraded to Yosemite from Mountain Lion, due to Mavericks having a display driver problem which caused GoToMeeting to crash. Yosemite fixes that, but now I can barely access my intranet! Ugh.
I know, the real fix is to get my IT department to use something other than "companyname.local" for its intranet.. but that ship turns slowly.