5

I want to insulate myself from changes to the domain of the server we're using. For example, right now we need to point to:

www.oursite.com.    IN  CNAME   www.myserver.com.

But the service we're using to host the site is changing it so we have to change the CNAME of every domain we have pointed to their new domain:

www.oursite.com.    IN  CNAME   www.myserver-two.com.

Since we have over a hundred domains that we must make this change to, we want to insulate ourselves in case this happens again in the future. Is it valid to setup a single domain ourselves:

www.corpsite.com.  IN CNAME  www.myserver-two.com.

And then point all of our other domains to that one:

www.oursite.com.   IN CNAME  www.corpsite.com.

Such that www.oursite.com will route through www.corpsite.com and end up hitting the correct server at www.myserver-two.com?

EDIT:

We have attempted this on one of the domains and it... appears to be working, but we cannot ping it (pings timeout). So we're not sure if it's just "accidentally" working, and what other issues there might be to doing things this way.

And this is what happens when I ping it:

$ ping www.oursite.com
PING us-east-1-a.route.myserver-two.com (scrubbed): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3

I think this is unrelated - I believe the server we're using is dropping ICMP packets.

nzifnab
  • 153

1 Answers1

9

The standards discourage such a solution.

It probably works with most DNS software, but your clients might encounter some which is not willing to follow multiple CNAMEs in succession. In that case, those clients using such a DNS resolver will likely not be able to access your service using those domain names.

In RFC1034:

Domain names in RRs which point at another name should always point at the primary name and not the alias.

Of course, by the robustness principle, domain software should not fail when presented with CNAME chains or loops; CNAME chains should be followed and CNAME loops signalled as an error.