# How to forward specific domain to specific upstream server

**URL:** <https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051>\
**Category:** Community How-to's\
**Created:** [July 13, 2017, 5:40pm UTC](https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051 "2017-07-13T17:40:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Costigliola](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/b5ac83/32.png) [@Thomas\_Costigliola](https://discourse.pi-hole.net/u/Thomas_Costigliola)\
**Post date:** [July 13, 2017, 5:40pm UTC](https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051/1 "2017-07-13T17:40:06Z")

</div>

How can I set up Pihole to forward specific domains to a particular upstream DNS server? For example, I want all .mydomain searches to go to a DNS server on the other side of a VPN tunnel, but all other searches to use the default configured upstream DNS.

Is this possible to setup in dnsmasq?

Thanks.

---

<div class="post-metadata">

**Author:** ![Thomas\_Costigliola](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/b5ac83/32.png) [@Thomas\_Costigliola](https://discourse.pi-hole.net/u/Thomas_Costigliola)\
**Post date:** [July 13, 2017, 6:17pm UTC](https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051/2 "2017-07-13T18:17:58Z")

</div>

Nevermind, I found the setting in dnsmasq.

I Added the following to /etc/dnsmasq.d/02-mydomain.conf:

```
server=/mydomain/192.168.1.1

```

---

<div class="post-metadata">

**Author:** ![thi.luciano](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@thi.luciano](https://discourse.pi-hole.net/u/thi.luciano)\
**Post date:** [May 11, 2022, 10:22pm UTC](https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051/3 "2022-05-11T22:22:30Z")

</div>

I had the same doubt, thanks.

---

<div class="post-metadata">

**Author:** ![shykitten55](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/shykitten55/32/18504_2.png) [@shykitten55](https://discourse.pi-hole.net/u/shykitten55)\
**Post date:** [July 20, 2022, 5:11am UTC](https://discourse.pi-hole.net/t/how-to-forward-specific-domain-to-specific-upstream-server/4051/4 "2022-07-20T05:11:12Z")

</div>

Could you help me with what you did?  
I have some addresses I would like to redirect to other places.
