Siteground Domain Setup
Introduction
Setting up custom domains with Mailgun can be a bit challenging for some users. This guide aims to simplify the process, using a video tutorial as a reference. By the end, you'll have a clear understanding of how to set up Mailgun custom domains, particularly with Siteground, though the principles can be applied to any DNS provider.
Overview
The process involves:
Logging into Mailgun and your DNS provider (Siteground in this example).
Creating a subdomain in Mailgun.
Adding the necessary DNS records in your DNS provider.
Verifying the DNS records in Mailgun.
1. Sign up for Mailgun.com
2. Check your email inbox to verify the email address
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284378416%2Foriginal%2FVewuZVN3oFOFIvBdf4XqMAOX4vtVGv_jNg.png%3F1677630998&width=768&dpr=4&quality=100&sign=dd550876&sv=1)
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284378421%2Foriginal%2FGU6IL6Y3N81qm6KMH9aTz7l5FV5IEv7ySA.png%3F1677630999&width=768&dpr=4&quality=100&sign=593c186&sv=1)
3. Login to Mailgun, Click on Sending > Add New Domain
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284378418%2Foriginal%2FkxsnymCeuFAsBWkXaOes6QaaWED2_bfASA.png%3F1677630999&width=768&dpr=4&quality=100&sign=29f7bc9b&sv=1)
4. 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
B. Please set up the domain or subdomain under US, not EU. not EU. not EU.
C. Click on Add domain
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284382652%2Foriginal%2FwoVjMqNw3YY_Zjs20LoBHUb4KrThVvj_Rw.png%3F1677635102&width=768&dpr=4&quality=100&sign=77a8c07e&sv=1)
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.
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fhelp.mailgun.com%2Fhc%2Farticle_attachments%2F8759612958491%2FScreen_Shot_2022-09-11_at_6.39.22_PM.png&width=768&dpr=4&quality=100&sign=dd96c4cc&sv=1)
5. 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 your first TXT record, Log in to Siteground
Go to Site Tools > Domain > DNS Zone Editor
In the Create New Record section
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284392257%2Foriginal%2FBnfApclXdbWZ_ONRoVqVaZZLCw-m9GTxFw.png%3F1677643477&width=768&dpr=4&quality=100&sign=235fe784&sv=1)
A. click on the TXT tab
B. Name: different for everyone, DO NOT INCLUDE THE ROOT DOMAIN
Depending on the subdomain you are trying to set up, if 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
C. Value: Same for everyone
paste the following record v=spf1 include:mailgun.org ~all
D. Click on Create
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284384681%2Foriginal%2FQCbqi3BnzhNKNCspyADXNWBZfk3F55e2dg.png%3F1677636916&width=768&dpr=4&quality=100&sign=ed8257da&sv=1)
To add the 2nd TXT record
Click on + Add Record again
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284392423%2Foriginal%2FWFBDHip6_j3WmEo4nRgIeENzQN-OEFhqqA.png%3F1677643605&width=768&dpr=4&quality=100&sign=1d140fb2&sv=1)
A. click on the TXT tab
B. 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: copy the highlighted part ONLY and paste it in the Name field
Example 1 using subdomain:
Copy mx._domainkey.helpdesk as the host name | |
Example 2 using main domain:
Copy mailo._domainkey as the host name |
C. Value: Head back to Mailgun and Copy and paste the 2nd TXT record here highlighted in the screenshot below
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284385043%2Foriginal%2FUvAhE3LGN5sYkTb4kyEsXNM0GE0Uc8Eq1Q.png%3F1677637220&width=768&dpr=4&quality=100&sign=f9257653&sv=1)
D. 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. Check out Can I Use the Same Domain Name for Mailgun and for Google Apps (Or Another Email Server)?
A. Name: Different for everyone
Depending on the subdomain you are trying to set up, if 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 @
B. Priority is 10 which is also same for everyone no matter what domain you are trying to set
C. Destination: Same for everyone
paste the following data mxa.mailgun.org
D. Click on Create
To add the 2nd MX records
Add another MX record again, this time Destination will be mxb.mailgun.org
A. Name: Different for everyone
Depending on the subdomain you are trying to set up, if 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 @
B. Priority is 10 which is also same for everyone no matter what domain you are trying to set
C. Destination: Same for everyone
paste the following data mxb.mailgun.org
D. Click on Create
To add the CNAME record
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284385721%2Foriginal%2F3LyKoigujZ-vEjMFQDflCfmRRfAJra3rYA.png%3F1677637907&width=768&dpr=4&quality=100&sign=bdd986f0&sv=1)
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284393711%2Foriginal%2FkhGHMR_qTn12M2FmkiCTjNf8k9lHWO-gDw.png%3F1677644645&width=768&dpr=4&quality=100&sign=175299bb&sv=1)
A. Click on the CNAME tab
B. 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, if 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
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284385985%2Foriginal%2FOtLw_A4zY8FbLbBKqMB9kUKRaQJO3xpp8A.png%3F1677638165&width=768&dpr=4&quality=100&sign=451f9f76&sv=1)
C. Resolves to: Same for everyone
paste the following data mailgun.org
D. Click on Create
Now that you have added 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
![](https://docs.getgymini.com/~gitbook/image?url=https%3A%2F%2Fs3.amazonaws.com%2Fcdn.freshdesk.com%2Fdata%2Fhelpdesk%2Fattachments%2Fproduction%2F48284387965%2Foriginal%2FI7T5QQCSjAnBvT1zqQlVgXSuNdgfuNiM3w.png%3F1677639928&width=768&dpr=4&quality=100&sign=c2b77acb&sv=1)
Conclusion
Setting up custom domains with Mailgun is a straightforward process once you understand the steps. This guide, combined with the video tutorial, should provide you with all the information you need to successfully set up your custom domain. Remember, while this example used GoDaddy, the principles remain the same for other DNS providers.
Last updated