Alias one set of Subdomains to another

Posted by Schneems on Server Fault See other posts from Server Fault or by Schneems
Published on 2012-11-09T22:45:49Z Indexed on 2012/11/09 23:03 UTC
Read the original article Hit count: 112

Filed under:
|

I have to domains that I want to effectively mirror one another on select subdomains. Let's say they are pirates.com and ninjas.com and i want ninjas to mirror the content on pirates.

When I visit foo.ninjas.com I want to see the content on foo.pirates.com. Due to app restrictions I need to do this in DNS for an undefined number of subdomains. I was under the impression i could do this with a CNAME, but it appears that setting a CNAME for * subdomain of the ninjas.com domain to point to pirates.com will make any subdomain of ninjas.com point at pirates.com instead of the associated subdomain. I.e. foo.ninjas.com would reference pirates.com instead of foo.pirates.com.

Is there a way to do this using DNS? Am I missing something basic?

© Server Fault or respective owner

Related posts about dns

Related posts about cname-record