# Query only certain DNS requests via other DNS servers?

**URL:** <https://discourse.pi-hole.net/t/query-only-certain-dns-requests-via-other-dns-servers/78068>\
**Category:** Customizing Pi-hole\
**Created:** [March 15, 2025, 1:40pm UTC](https://discourse.pi-hole.net/t/query-only-certain-dns-requests-via-other-dns-servers/78068 "2025-03-15T13:40:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![darkexplosiveqwx](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/darkexplosiveqwx/32/45118_2.png) [@darkexplosiveqwx](https://discourse.pi-hole.net/u/darkexplosiveqwx)\
**Post date:** [March 15, 2025, 3:31pm UTC](https://discourse.pi-hole.net/t/query-only-certain-dns-requests-via-other-dns-servers/78068/2 "2025-03-15T15:31:48Z")

</div>

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`

```auto
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](https://discourse.pi-hole.net/t/geoip-dns-multiple-resolver/28003/4)

---

_[View the full topic](https://discourse.pi-hole.net/t/query-only-certain-dns-requests-via-other-dns-servers/78068)._
