This also moves the domain check before the type check.
Domains need to be compared case-insensitively because resolvers will
send sarcastic queries for improved security, see here:
https://datatracker.ietf.org/doc/html/draft-vixie-dnsext-dns0x20-00
strings.EqualFold is maybe not perfectly correct because it does Unicode
case-folding and we only need ASCII.