Step-by-step Mailgun Setup - Siteground Domain Setup
Sign up for Mailgun.com
Check your email inbox to verify the email address
Login to Mailgun, Click on Sending > Add New Domain
If your domain is companyname.com, you can either set up the main domain or subdomain with Mailgun.
A. Main domain:
- If you are adding the main domain, it should not be used with Gsuite or any other email provider.
Subdomain: To set up the subdomain with Mailgun, you can type ANYTHING_HERE.companyname.com
- Examples:
- mg.companyname.com
- replies.companyname.com
- support.companyname.com
- mg.companyname.com
B. Please set up the domain or subdomain under US, not EU.
C. Click on Add domain
The next screen that you're taken to will ask you to add DNS records to your domain. Leave this screen open for the next step.
Now log in to your DNS records based on where you get the domain and add the 5 DNS records.
To add the 1st TXT record:
To add yourFirst TXT record, Log in to Siteground
Go to Site Tools > Domain > DNS Zone Editor
In the Create New Record section:
Click on the TXT tab
Name: different for everyone, DO NOT INCLUDE THE ROOT DOMAIN
Depending on the subdomain you are trying to set up:
- mg.companyname.com: The host name will be mg
- replies.companyname.com: The host name will be replies
- If you are setting up a main domain like companyname.com, the host name will be @ or leave empty
Value: Same for everyone
Paste the following record:v=spf1 include:mailgun.org ~all
Click on CreateTo add the 2nd TXT record:
Click on + Add Record againClick on the TXT tab
Name: It's a bit tricky but the key here is to copy everything from the beginning until the subdomain part, DO NOT INCLUDE THE ROOT DOMAIN.
**Everyone's 2nd TXT record host name and value is different.
Examples:Example 1 using subdomain:
Copy mx._domainkey.helpdesk as the host name
Example 2 using main domain:
Copy mailo._domainkey as the host name
Value: Head back to Mailgun and Copy and paste the 2nd TXT record here highlighted in the screenshot below
Click on Create
To add the 1st MX records:
Click on the MX tab > Select Add your own MX records
If you have a Gsuite account to capture incoming emails for the main domain, make sure you are using a subdomain for Mailgun.
Name: Different for everyone
Depending on the subdomain you are trying to set up
mg.companyname.com: The host name will be mg
replies.companyname.com: The host name will be replies
- If you are setting up a main domain like companyname.com, the host name will be @
Priority is 10, which is the same for everyone
Destination: Same for everyone
Paste the following data:mxa.mailgun.org
Click on Create
To add the 2nd MX records:
Add another MX record. This time, the destination will be mxb.mailgun.org
.
Name: Different for everyone
Depending on the subdomain you are trying to set up
mg.companyname.com: The host name will be mg
replies.companyname.com: The host name will be replies
- If you are setting up a main domain like companyname.com, the host name will be @
Priority is 10 which is also same for everyone no matter what domain you are trying to set
Destination: Same for everyone
Paste the following data:mxa.mailgun.org
Click on Create
To add the CNAME record:
Click on the CNAME tab
Name: Different for everyone
Head back to Mailgun to copy the host name. It's a bit tricky, but the key here is to copy everything from the beginning until the subdomain part, DO NOT copy the main domain.Depending on the subdomain you are trying to set up:
- mg.companyname.com: The host name will be email.mg
- replies.companyname.com: The host name will be email.replies
- If you are setting up a main domain like companyname.com, the host name will be email
Resolves to: Same for everyone
Paste the following data:mailgun.org
Click on Create
Now that you have added the 5 records, go back to Mailgun and click on Verify DNS Settings.
Click the same button to Verify DNS Settings again if some records are still not showing the green checkmark.
Once you add all the DNS records and verify them, you can grab the Mailgun API Key and put it in the software.
Then, send a test email to see if everything works.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article