Serving local subdomains

Trying to migrate from dnsmasq to unbound, I have a problem getting the setup to match.

I have domain example.com which is hosted by our website service provider so I can browse to [http://example.com/](http://example.com/) (no www needed). I also run a web server locally for various in-house systems which are
subdomains of example.com - e.g mail.example.com, apex.example.com etc.

If I try to use config lines such as:

local-data: "mail.example.com. IN A 192.168.0.14"
local-data:  "example.com. IN MX 1 mail.example.com"
local-data: "apex.example.com. IN A 192.168.0.10"
local-data-ptr: "192.168.0.14 mail.example.com"

I then cannot browse to [http://example.com/](http://example.com/) and I am currently having to add a config line containing the actual IP address of the website at our hosting provider:

local-data: "example.com IN A <website ip-address>"

Can anyone help me get this setup the right way?

Neil.

Zack,

Doesn't work (I tried that already), and anyway the docs say if no local-zone is present when local-data used, then a transparent local-zone is created by default.

Neil.

Zack,

My mistake!

local-zone: "example.com" typetransparent does exactly what is needed. DNS is a bit of a headache for a novice like me...

I do notice a difference between output of dig (shows desired results - the internal ip for subdomains and external for domain/website)
and of unbound-host (always returns the external ip) - another mystery to solve.

Regards,

Neil.

P.S A bit nervous about top-posting, but I see it is fairly common on this list..

Hello there,

imho the difference is in the 'typetransparent' declaration. While
'transparent' only looks at the zone, 'typetransparent' also takes the
type into consideration.

Anyways, I'm glad it worked.

Greetings,

Zack