0

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

1 Answer 1

1

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.

1
  • 1
    Boom, works. Except you cant set CNAMEs for the apex without the www, but we can live with www.
    – eos
    Sep 8, 2021 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .