Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know that if I have a website hosted on one sub-domain, I can create an alias sub-domain using CNAME records with the following setup:

subdomain.primary.com
A 50.50.50.50

subdomain.vanity.com
CNAME subdomain.primary.com

The thing I am not sure about is whether DNS record types, other than A records, will be redirected. For example:

subdomain.primary.com
A 50.50.50.50
MX 1 50.50.50.51
MX 2 50.50.50.52
TXT some text string

subdomain.vanity.com
CNAME subdomain.primary.com

Will subdomain.vanity.com inherit all DNS records from subdomain.primary.com?

What if there is a sub-domain of subdomain.primary.com? In my case, I am looking at setting up DKIM records:

k0._domainkey.subdomain.primary.com
TXT k=rsa...

Will subdomain.vanity.com inherit all of those records too?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

A canonical name CNAME record states that subdomain.vanity.com is basically an alias of subdomain.primary.com, so this will affect all query types. There's no reason to believe that it would be specific to A queries, that's just its most common use.

The CNAME record only applies to subdomain.vanity.com though.

share|improve this answer
    
What about the _domainkey subdomain? It looks like Sendgrid is adding another CNAME record. I did not know that was legal. sendgrid.com/docs/User_Guide/whitelabel_wizard.html –  dana Sep 4 '13 at 16:56
1  
@dana simply adding more dotted words to the beginning of a DNS record does not mean it is a subdomain, though that term has been co-opted and corrupted by many hosting companies. this.is.simply.a.long.hostname.domain.com A true DNS sub-domain will actually delegate responsibility for DNS lookups for the sub-domain to another set of DNS servers entirely –  Sammitch Sep 4 '13 at 17:22
1  
One DNS resource can only have 1 CNAME. Having more than one (or a CNAME and other records, other than DNSSEC) makes no sense. Looking at the Sendgrid page, they show 3 CNAME records to add, but each one is for a different resource (location as they call it in the table) –  USD Matt Sep 4 '13 at 18:02
    
Thanks for the comments :) I learned some interesting stuff here. –  dana Sep 5 '13 at 14:32
add comment

No. The CNAME record is nothing but an alias to an A record. It does not inherit nor affect any other record or lookup.

If you want A/MX/TXT records for subdomain.vanity.com you will have to define them separately.

edit:

In the case of the DKIM records the answer is a little fuzzier. Messages sent by a server with DKIM set up to sign messages with primary.com's DKIM can sign messages sent via the vanity.com domain, but the DKIM signature will refer to primary.com as the DKIM signer so that receiving servers will look up the correct key.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.