anthonyg
By:
anthonyg

MX record for subdomains?

October 4, 2014 21.2k views

Is there any way with DigitalOcean DNS to create an MX record for a subdomain?

Our email is handled by Gmail, so we have the standard MX records:

MX 1 ASPMX.L.GOOGLE.COM.
MX 5 ALT1.ASPMX.L.GOOGLE.COM.
MX 5 ALT2.ASPMX.L.GOOGLE.COM.
MX 10 ASPMX2.GOOGLEMAIL.COM.
MX 10 ASPMX3.GOOGLEMAIL.COM.

However, we also process incoming email through our application via Mandrill (http://mandrill.com/). This requires a separate subdomain (e.g. inbound.mydomain.com), for which we'd need subdomain-specific MX records.

There doesn't seem to be a way to specify a subdomain name on the DigitalOcean DNS control panel. Am I mistaken, or am I going to have to use a separate managed DNS provider (e.g. http://dnsmadeeasy.com or AWS Route53)?

Thanks,
Anthony

11 Answers

I finally figured it out: put in your fully qualified subdomain as a new domain in your DNS settings, as if you were setting up an entirely new domain. (subdomain.domain.com). You can then set the MX records from there.

I ended up here because I need to add MX records for Mailgun. I am saddened because this feature, although it doesn't seem on the surface like it would be difficult to add, doesn't exist, and there doesn't appear to be any desire to add it. Your DNS manager is beautiful, and would be my preferred choice, over GoDaddy, ZoneEdit, Google, Gandi, or whatever. I humbly ask that this be place on your todo list.

Thanks,

Jay

Found out that you can actually set the subdomain mx record via the api, it also gets displayed correctly in the zone file but not in the interface itself.

+1 for adding sub-domain MX records. We had a news letter setup when we migrated it does not work now, because it was configured for a sub-domain. You inbond emails are handled by gmail. Any detailed tutorials on how to get this working (work-around) ?

Unfortunately at the moment it's not possible to add MX records for a subdomain so you will have to use a different DNS service such as DNSMadeEasy, Amazon Route53, or Cloudflare (which is free).

Hi jcheroske, as davidmarshalljr said in the first answer, it is possible to create a new domain from scratch, in the main DNS window (instead or yourdomain.com use subdomain.yourdomain.com as domain name), and then inside it you can add MX and TXT records for mailgun, I have modified it right now and it seems to work.

+1. Another user of Mailgun

Hey guys, I have the same problem and I'm using CloudFlare as DNS server, and it does not allow me to add the subdomain as a new domain in CloudFlare.

You can't do this in the UI, but you can in the API:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer APIKEYHERE" -d '{"type":"MX","name":"SUBDOMAIN.","data":"mxa.mailgun.org.","priority":10,"port":null,"weight":null}' "https://api.digitalocean.com/v2/domains/DOMAIN_HERE.com/records"

Note this is all one line, and name goes in the subdomain. Don't include your domain in that or it will duplicate it.

Have another answer? Share your knowledge.