Query only certain DNS requests via other DNS servers?

Hi, is it possible to instruct the Pi-hole not to query certain pre-defined DNS queries via the “standard” DNS servers but via others?

I know this is a pretty stupid question ...
I'll try to explain it: For some time now, the German Internet has also enjoyed the “luxury” of web blocks, which are actually just DNS redirects.

The simplest solution would be to route all queries via one of the suggested “upstream DNS servers”, which is not what I want.

I had already asked about this with pihole 5.x, but apparently it wasn't possible back then.

I apologize in advance for my poor english.

This is possible via a custom dnsmasq configuration, which would have as far a I know also worked in v5.
Add the following to /etc/dnsmasq.d/servers.conf

server=/domain.com/1.1.1.1
server=/other.com/1.1.1.1

This will forward all subdomains of domain.com to 1.1.1.1

You need to enable MISC.ETC_DNSMASQ_D ( Web > All Settings > Miscellaneous) for this to work.

This was already pointed out by Bucking_Horn in the original post with the link to GEOIP + DNS multiple resolver - #4 by Bucking_Horn

2 Likes