How to use CNAME to external hosts on local DNS Server?
You do not have to create an internal zone example.com
which overrides the whole domain, create an internal zone for a subdomain newserver.example.com
authoritative for *.newserver.example.com
and the zone name itself without any prefix i.e. newserver.example.com.
Since you're using this only in your internal DNS you have, I think, an edge case, where you don't necessarily run into this problem and can still do:
# zone for newserver.example.com.
@ IN CNAME newserver.cloudapp.net.
and don't have to do
# zone for newserver.example.com.
@ IN A <the_ip-address_of_newserver.cloudapp.net.>
which is the alternative.
Ederson
Updated on September 18, 2022Comments
-
Ederson over 1 year
I have a domain
mydomain.com
and I'm using an external DNS Server to resolve some names likewww.mydomain.com
andwebmail.mydomain.com
on Internet.Now, I need to create a rule, only on my LAN, to resolve
newserver.mydomain.com
tonewserver.cloudapp.net
(a new server hosted at Azure).At first I tought, "I can create a CNAME entry on my local DNS Server and the job is done!" but to do it I had to create another zone to resolve
*.mydomain.com
and all went wrong. My DNS server was able to resolvenewserver.mydomain.com
but all other URLs were unavailable... of course, my local DNS server became "authoritative" for that domain.I'm using Windows Server 2012, and I only want to configure my DNS Server to do this:
Resolve this entry:
newserver.mydomain.com CNAME newserver.cloudapp.net
and
*.mydomain.com
still resolving on external DNS Server.How can I do that?
Thanks in advance! ;)
-
vautee over 9 yearsIf we're talking about resolving on one host only: Why not use your hosts file for this? :)
-
Ederson over 9 yearsWe need resolve this name from any host in our LAN... thanks ;)
-