You can't do this; this is not the way IP routing works.
DNS is name resolution. It's nothing more than an address book of names pointing to some numbers (IPs)
myhost.com --------> 111.222.333.444
DNS tells you what the address is, not how to get there. IP routing is the mechanism of how you get from one point to the next. It's the same difference between "Contacts" and "Maps" in your iPhone.
I basically want tell macOS to search for a host in a specific
You can't tell an interface what "hosts" (names) are there. You tell it what networks are accessible. Networks are defined by IP address(es).
en0 has an IP of
192.168.1.4 and is on the network
en1 has an IP of
10.0.0.9 and is is on the network
10.0.5.0/24 is attached (via switch) on the
Now, you add a host called
foo.bar in DNS and it has an IP address of
10.0.0.12. Your system will know to go through interface
en1 to get to it.
If another host, called
foobar.foo had an IP address of
10.0.5.12, again, it would know to go through
en1 because that route would be defined.
To accomplish what you're looking to do, your host has to be able to get name resolution across two separate domains (not interfaces). You can accomplish this two ways: