How to forward missing DNS names of an existing zone in Windows DNS server

domain-name-systeminternal-dnswindows-server-2003

I have setup DNS records for a public domain (say example.com) in my public DNS provider. Among the records, there are some A records of the type *.production.code.example.com that point to a specific public IP.

I need to setup local DNS in my Windows Server 2003 DNS server so that *.dev.code.example.com to be answered by this local DNS server but every other request to be forwarded to the web for getting the answer.

When trying to setup a example.com primary zone in local Windows Server 2003 DNS server and adding *.dev.code.example.com A records (for local development purposes), I cannot get answers for *.production.code.example.com. Thus, the local DNS server does not forward the requests for *.production.code.example.com to the web despite the fact that these names cannot be resolved by the local DNS server.

The temporary solution I came up with was to create a code.example.com primary zone in local DNS and add dev and production domains under it (this leads to replicating the records of production.code.example.com from my DNS provider to my local DNS server).

How can I implement the above, without having to replicate DNS records each time?

Regards

Best Answer

Don't add a primary zone on your Windows DNS server for example.com. If you do that, it will consider itself authoritative for any record within that namespace, so it will never ask the outside world for answers.

Instead, add a primary zone for dev.code.example.com. In that zone you create an A record '*' with the IP you want to use. Don't try to create a PTR, it won't work.

enter image description here