You can put in multiple queries in a single packet. It's just that the response header would be ambiguous (a NODATA status could refer to any one of your queries) and therefore not even a minority of clients or servers support this.
It's right there in the protocol, we just need to figure out how to signal NODATA/NXDOMAIN/SERVFAIL/... for each individual query.
Didn't know that thank you! I guess it should be more compact though. Sending multiple complete queries would almost certainly need TCP, not sure the browsers would like that. Then again I think we're getting to the point where DNS should now be considered a mostly TCP protocol.
A IN 38:mydomainnameislongerthanyourdomainname 3:com
AAAA IN <2 bytes pointer>
CNAME IN <2 bytes pointer>
SRV IN <2 bytes pointer>
So 43 bytes for the name (41 bytes data, 2 length fields), plus 4 bytes for the type and class, and 6 bytes (type, class pointer) for each additional type. Even if you would already consider 200 bytes to be a lot of overhead, that would fit `floor(200/6)`=33 question records, more than I think we'd ever use. (Sure, the exist more, but currently we only query for A and AAAA. The overhead of that, when using the current DNS format but using multiple queries in one packet, is a grand total of 6 bytes.)
It's right there in the protocol, we just need to figure out how to signal NODATA/NXDOMAIN/SERVFAIL/... for each individual query.