Let's say I've got a wildcard subdomain CNAME for root domain:

*.domain.com CNAME domain.com
domain.com A 130.71.45.31

This works well for websites, e.g. subdomain.domain.com.

Now let's say I have an MX record on the root domain.

I assumed that emails to: person@subdomain.domain.com would work, but they fail. Emails of the form person@domain.com work just fine.

Where am I going wrong?

link|improve this question

70% accept rate
feedback

1 Answer

If your MX record is for example.com, mail addressed to sub.example.com will be delivered there if and only if there is no A record for sub.example.com, AND there is no redirection taking place for sub.example.com.

Just Say No and remove the egregious CNAME:

$ORIGIN example.com.
* IN A 130.71.45.31
link|improve this answer
Hold on- I need the CNAME for the subdomains to point to the webserver; is it conflicting with the MX? – chrism2671 Nov 21 '11 at 17:42
2  
No, you do not need the CNAME. – adaptr Nov 21 '11 at 17:42
To clarify adaptr a bit - you can have an A record for *.example.com - you don't need a CNAME. Also, you can enter MX records for subdomain.example.com as well, which might end run this whole thing, unless you're planning on having mail send to randomthing.example.com a fair bit. – Driftpeasant Nov 21 '11 at 19:22
Actually, I have to have *.example.com CNAME example.com in order to get multiple subdomains to redirect to one server. But this would break the MX right? – chrism2671 Dec 17 '11 at 16:06
feedback

Your Answer

 
or
required, but never shown

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