Jun 6, 2012
tom

Setup a DNS wilcard and MX record in the same zone

Question

I’d like to know how to configure my DNS to be able to use a wildcard for my domain and an MX record together. Here is what I’ve done:

@   IN SOA dns100.ovh.net. tech.ovh.net. (2012052100 86400 3600 3600000 300)
              IN  NS     ns100.ovh.net. 
              IN  NS     dns100.ovh.net. 
              IN  MX 1   mail.gestixi.com. 
              IN  A      91.121.39.211 
*             IN  CNAME  gestixi.com. 
www           IN  CNAME  gestixi.com. 

The problem is that when I check my DNS, I get this error:

MX records shall not point to an alias defined by a CNAME

Because of this error, it look like I can’t send my from some internet providers.

Asked by Nicolas BADIA

Answer

mail.gestixi.com needs to be an A record, instead of getting caught by the wildcard CNAME.

If it’s on that same server, then just give it an A record:

mail          IN  A      91.121.39.211

I’m not sure how strictly relays actually enforce this part of the standard, since it just causes some extra lookups, but it’s better to be on the compliant side!

Answered by Shane Madden

Related posts:

  1. How to set up the CNAME in DNS zone record to work with Unbounce
  2. What happens when I change a Name Server record or an A record in the Zone file or the DNS settings?
  3. Is it possible to have regular-expression CNAME record in DNS?
  4. CNAME : how to setup DNS to return A record based on website?
  5. DNS: Subdomains that Require Both an MX Record and a CNAME

Leave a comment