Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Root domain CNAME to other domain allowed by DNS RFC? [closed]

Tags:

We are hosting the page of many of our customers. We want to be able to provide our customers with a subdomain of our own domain like customerpages.ourdomain.com so they can create a CNAME to this subdomain.

www.customer1.com CNAME customerpages.ourdomain.com.  {This will work just fine.} 

But the situation is I don't know if all our customers will be able to place the following CNAME

customer1.com CNAME customerpages.ourdomain.com 

This last CNAME looks like it's against the RFC of DNS.

Any thoughts will be appreciated.

like image 493
Geo Avatar asked Mar 17 '09 17:03

Geo


People also ask

Can DNS CNAME point to another domain?

CNAME records must point to another domain name, never to an IP address. A hostname defined in a CNAME record must have no other resource records of other types (MX, A, etc.), except for DNSSEC records like RRSIG and NSEC.

Can a CNAME point to another CNAME?

Restrictions. A CNAME record must always point to another domain name and never directly to an IP address. A CNAME record cannot co-exist with another record for the same name. It's not possible to have both a CNAME and TXT record for www.example.com .

Can CNAME point to another zone?

CNAME records must always point to another domain name, never an IP-address. The canonical name that a CNAME records points to can be anywhere in the DNS (local or in a different DNS zone).

How does DNS CNAME work?

A CNAME record is stored in your domain's DNS settings as a pair of values. One value identifies the alias you're creating the record for, which is typically a subdomain like www or mail. The other value identifies the domain the alias should point to.


2 Answers

No, you can't do that - CNAME records can only exist as single records and not combined with any other resource record (DNSSEC records excepted).

There are explicit SOA and NS records always present at the top of each domain, so that prevents the use of the CNAME at the same part of the hierarchy.

like image 120
Alnitak Avatar answered Sep 20 '22 15:09

Alnitak


It's true, given a domain example.com, some DNS servers (tinydns for one) won't complain if you set up CNAME records for both example.com and www.example.com. But still I'd avoid it as it would break e-mail for example.com (see RFC 2821 "Address Resolution and Mail Handling").

like image 39
drench Avatar answered Sep 17 '22 15:09

drench