Can We Have Multiple CNAMES For A Single Name?


Answer :

Solution 1:

Multiple CNAME records for the same fully-qualified domain name is a violation of the specs for DNS. Some versions of BIND would allow you to do this (some only if you specified the multiple-cnames yes option) and would round-robin load-balance between then but it's not technically legal.

There are not supposed to be resource records (RRs) with the same name as a CNAME and, to pick nits, that would include multiple identical CNAMEs. Quoth RFC 1034, Section 3.6.2:

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different. This rule also insures that a cached CNAME can be used without checking with an authoritative server for other RR types.

The letter-of-the RFC method to handle what you're doing would be with a single CNAME referring to a load-balanced "A" record.

Solution 2:

You cannot. A CNAME makes one record another name for another. If a record could have CNAMES for two names, it wouldn't be another name for either of them, but a name for something entirely new, making a CNAME entry inappropriate.

There's likely a good way to solve your outer problem though. For example, you can have multiple A records.


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable