Can there be 2 domains specified in pihole.toml?

The issue I am facing: I am wondering if it is possible to define two local domains in my pihole.toml. I am attempting to host two internal domain names in the same ip space. everything involved here would have manual ips and local records created. No inbound external access at all.

Details about my system:

pihole details: Docker Tag 2025.11.1Core v6.3 FTL v6.4.1

Reverse server setting (1st server)

rev-server=192.168.0.0/24,192.168.0.1
server=/domain1.local/192.168.0.1
server=//192.168.0.1

Reverse server setting (2nd server)

rev-server=192.168.0.0/24,192.168.0.1
server=/domain2.local/192.168.0.1
server=//192.168.0.1

DNS domain for both the DNS and DHCP server
This DNS domain is also used for reverse lookups
It is forwarded to the upstream servers configured above
(see server=//target above)

domain=domain1.local

pihole is the primary internal dns for domain1

I currently am able to resolve everything in domain1.local.

Domain2 has a separate internal dns server and pihole is configured as conditional forwarder.

Hosts in domain2 are able to resolve hostnames from domain1 with no issue.

Hosts in domain1 are unable to resolve hostnames in domain2, even with hosts entries manually entered into pihole.

I have added domain2’s dns server into upstream dns servers on the pihole.

Is it possible/valid to have two lines in pihole.toml such

domain=domain1.local

domain=domain2.local

What I have changed since installing Pi-hole:

The term 'domain' is used with too many different meanings here.

In the most obvious context of DNS, a domain is simply any DNS name (like discourse.pi-hole.net or 1. europe.pool.ntp.org).

In the context of Pi-hole, it can have additional meanings.

The domain option as showing up in your custom dnsmasq configuration lines would be specific to its DHCP server - it would be used to specify a local search domain for dnsmasq's DHCP server, restricting which names a DHCP client could claim legitimately.

The Pi-hole domain name as exposed via Pi-hole's Settings | DNS in Expert mode will -among others- affect that domain option.

But your description implies yet another meaning, e.g. 'Hosts in domain1 are unable to resolve hostnames in domain2' seems to refer to domain as if domain1 and domain2 were some kind of subnets or networks.

Could you resolve that ambiguity and elaborate on your networks?

And just in case domain1.local would be an actual domain, you should note that the .local TLD is reserved for mDNS protocol usage and should not be used with plain DNS.
If you should really be using that domain, you should switch to one of the non-public domains intended for private usage (e.g. internal, home.arpa, lan).