MX record for subdomains?

October 4, 2014 18.4k 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:


However, we also process incoming email through our application via Mandrill ( This requires a separate subdomain (e.g., 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. or AWS Route53)?


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. ( 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.



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 use 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":"","priority":10,"port":null,"weight":null}' ""

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.