Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mailgun, receive mail on root domain and not just subdomain

Tags:

dns

mailgun

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 [email protected] and forwards to my Gmail, and that all works fine.

How would I catch mail coming to [email protected] (the root domain, not the subdomain)?

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

like image 548
himmip Avatar asked Feb 02 '16 15:02

himmip


People also ask

Should I use a subdomain for email?

Using a subdomain rather than your company's top-level domain will provide easier reputation tracking because it will be separate from other domains and subdomains being used within your company. This is extremely important in email deliverability because this allows you to gauge how many clicks, opens, forwards, etc.

Can I have email on a subdomain?

A subdomain is the 'child' of that parent domain, identified by a prefix that indicates that it's a distinct subsection of the larger domain. Once you've decided on your subdomain, you can put anything before the @ symbol in your email addresses.

How do I change my domain on Mailgun?

Configure your Domain for Email In Mailgun, navigate to Sending > Domains click Add New Domain. Add your domain and follow the setup. You will be given two TXT (SPF and DKIM), two MX, and a CNAME record. Update these records in your DNS provider.

How many Domains can you have with Mailgun?

You can create up to 1,000 domains on a paid plan in the Control Panel or through the :ref:`Domains API <api-domains>`(Free accounts do not include the ability to create a custom domain).


1 Answers

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 [email protected]

Mail     IN MX   10 mail.example.com
Mail     IN MX   20 mail2.example.com
like image 81
Michael B Avatar answered Sep 20 '22 13:09

Michael B