Score:0

How to use Azure DNS server to set local CNAME?

pk flag
eos

As you can't set CNAMES using local hosts file, I needed to setup a simple hosted DNS server we can point at so our team can see a beta version of our system which happens to be on AEM CMS which uses fastly and requires CNAMES to access.

I tried setting up an Azure "DNS Zone" then I added a "record set" of "mytargetdomain.com" with a CNAME of cdn.adobeaemcloud.com, and one for "www.mytargetdomain.com" to it.

at the top of the resource overview, it shows

Name server 1 : ns1-08.azure-dns.com.
etc.

If I use ns1-08.azure-dns.com as my dns server, and query mytargetdomain.com it gives me the live A record IP, not the CNAME I just setup.

 nslookup mytargetdomain.com ns1-08.azure-dns.com

gives:

 Server:        ns1-08.azure-dns.com
 Address:   40.90.4.8#53
 *** Can't find mytargetdomain.com: No answer

I must admit I don't know much about DNS and SOA etc, but there really isn't anything else which can be configured or edited.

enter image description here

Score:1
ng flag

The name of a record in a DNS zone should not include the domain name. To create a record called www.domain.com in a zone called domain.com, the record name should be www.

You can create a CNAME record called www in your mytargetdomain.com zone and set its value to cdn.adobeaemcloud.com; this will effectively map www.mytargetdomain.com to cdn.adobeaemcloud.com.

You can also create a record with an empty name; this will map the domain name itself to a target. However, this can only be done using A records, not CNAME ones; you can map a domain name to an IP address, but not to another name.

pk flag
eos
Boom, works. Except you cant set CNAMEs for the apex without the www, but we can live with www.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.