Ever since Lion, OS X uses mDNSResponder for DNS lookups, and its implementation is not the best. Even though search domains are configurable, they don't work properly when you include a subdomain.
Let's say your search domain is 'company.com'
It will work just fine for:
host1
and the DNS query will be made as
host1.company.com
But it won't work for
host1.dev
It should look up
host1.dev.company.com
but it is searching for host1.dev and failing.
There's a thread that talks about fixing this on Lion (https://forums.macrumors.com/showthread.php?p=12887417) and this same fix worked on Mountain Lion. But unfortunately, this did not work on Mavericks.
nslookup does the right thing, but nslookup does not use mDNSresponder
It seems like the 'AlwaysAppendSearchDomains' option to make mDNSresponder add the search domains is not working as it should in Mavericks.
Let's say your search domain is 'company.com'
It will work just fine for:
host1
and the DNS query will be made as
host1.company.com
But it won't work for
host1.dev
It should look up
host1.dev.company.com
but it is searching for host1.dev and failing.
There's a thread that talks about fixing this on Lion (https://forums.macrumors.com/showthread.php?p=12887417) and this same fix worked on Mountain Lion. But unfortunately, this did not work on Mavericks.
nslookup does the right thing, but nslookup does not use mDNSresponder
It seems like the 'AlwaysAppendSearchDomains' option to make mDNSresponder add the search domains is not working as it should in Mavericks.