Skip to content
On GitHub Arun on Twitter

dnsmasq - Custom DNS resolvers for specific domains

Learned a neat thing today — it's possible to set custom DNS resolvers for certain domains. I can create a custom config file for dnsmasq and specify the DNS resolvers to use for those domains. I don't have a need for it today, but may be handy in cases like not loading on Cloudflare DNS.

These requests still go through pihole, so ad-blocking capabilities are available. It's just the upstream that changes. My test below confirms so: I have set to be queried using Google DNS but requests still pass through pihole.



I use two Raspberry Pi devices at home, both running pihole with Unbound as a recursive DNS resolver. These devices are connected to my Tailscale network, so all of my devices (and my friends) can enjoy Unbound and pihole's ad-blocking capabilities.