-4

I recently bought a new domain from namecheap and decided to delegate it to Yandex.Connect services, so I changed namecheap's DNS to custom, added Yandex' nameservers (dns1.yandex.net and dns2.yandex.net) in the control panel, added the proof and within a couple hours my domain was being managed by Yandex.

Since I am hosting a personal site in my own premises and since my ISP doesn't sell any static IPs I decided to use DDNS. But when I tried to add a CNAME for @ that points to my-domain.example-ddns.org I found out it does... nothing. The record just isn't being created. I tried adding another one for a subdomain and it works perfectly fine.

After reading Yandex' guides I read this:

CNAME. Remember that a CNAME record can't be set up for the domain root, because this is prohibited by the RFC.

Imagine my shock when I read such a thing, when at the same time I have another domain registered with namecheap, but using namecheap's basic DNS instead, where I set up a CNAME record for @ that points to my-other-domain.example-ddns.org and it works perfectly fine!

How do I work around this? Using an A record is a no-go since I can't get an static IP.

arielnmz
  • 433

1 Answers1

2

There is no easy way around this. Per RFC 1912:

2.4 CNAME records
    A CNAME record is not allowed to coexist with any other data.

However, the apex of any zone MUST contain other data, such as SOA and NS records, which is why a CNAME cannot exist at the top.

Therefore, you generally have to resort to an A record rather than a CNAME; there are exceptions to this, however, in cases where the domain is being hosted by server capable of dynamically generating the A records. For example, EasyDNS has a way around this using a proprietary implementation of an "ANAME" record, described here. A standard, RFC-compliant nameserver will not support this feature directly, however.

guzzijason
  • 1,430