10

I created a subdomain for Mailgun, mail.example.com, and added all the DNS settings they told me to add (TXT, CNAME, MX).

After adding the MX records on mail.example.com I added a route in the Mailgun settings which catches mail coming to something@mail.example.com and forwards to my Gmail, and that all works fine.

How would I catch mail coming to something@example.com (the root domain, not the subdomain)?

Do I just add the MX records (mxa.mailgun.org and mxb..) on the root domain also?

himmip
  • 1,360
  • 2
  • 12
  • 24

1 Answers1

4

Within DNS the root of the domain i.e.example.com is called the apex, and uses the @ symbol.

So to set an MX record to the apex of the domain you would set a record something like this

@     IN MX   10 mail.example.com
@     IN MX   20 mail2.example.com
etc

If you set those records to mail instead of the apex, then you will get mail at something@mail.example.com

Mail     IN MX   10 mail.example.com
Mail     IN MX   20 mail2.example.com
Michael B
  • 11,887
  • 6
  • 38
  • 74
  • The problem is that google apparently doesn't let you add two mx records for the same subdomain. Adding `10 mail.example.com` works but when trying to also add `20 mail2.example.com`, it says "Record already in use". – Christoph Jan 01 '18 at 16:56