Skip to content
Email

Mailgun Setup - Siteground Domain Setup

Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What…

5 min read1,115 words21 explained imagesUpdated Wed, 1 Jul at 7:12 AM
View as markdownOpen in ClaudeOpen in ChatGPT
Each image has a one line explanation. Switch to full detail for the step it belongs to, the fields and buttons involved, examples and the whole procedure.
On this page
  1. Sign up for Mailgun & add your domain
  2. Access DNS records in SiteGround
  3. Add the 1st TXT record (SPF)
  4. Add the 2nd TXT record (DKIM)
  5. Add the 1st MX record
  6. Add the 2nd MX record
  7. Add the CNAME record
  8. Verify DNS & finish setup
  9. Frequently Asked Questions
Email Infrastructure
Mailgun + SiteGround Domain Setup
Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround.
What You'll Learn

This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT records, two MX records, and one CNAME — inside SiteGround's DNS Zone Editor.

It also covers how to avoid breaking your existing Google Workspace/Gmail mail delivery while adding Mailgun's records.

1Sign up for Mailgun & add your domain

Step 1

Sign up at Mailgun.com, then check your inbox to verify your email address.

Sign up for Mailgun & add your domain (image 1 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 1 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Sign up for Mailgun & add your domain (image 2 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 2 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Step 2

Log in to Mailgun, then click Sending → Add New Domain.

Sign up for Mailgun & add your domain (image 3 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 3 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Step 3

If your domain is companyname.com, decide whether to set up the main domain or a subdomain with Mailgun.

  • Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  • Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Important

Set up the domain or subdomain under the US region — not EU.

Click Add domain.

Sign up for Mailgun & add your domain (image 4 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 4 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Tip

The next screen asks you to add DNS records to your domain. Leave this screen open — you'll need it for the next step.

Sign up for Mailgun & add your domain (image 5 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Sign up for Mailgun & add your domain" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 5 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

2Access DNS records in SiteGround

Now log in to your DNS records and add the 5 DNS records Mailgun requires.

Step 1

Log in to SiteGround. See SiteGround's own guide on managing DNS records if you'd like more detail.

Step 2

Go to Site Tools → Domain → DNS Zone Editor.

Access DNS records in SiteGround (image 6 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Access DNS records in SiteGround" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Access DNS records in SiteGround" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 6 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Step 3

In the Create New Record section, you'll repeat the process below for each of the 5 records.

Access DNS records in SiteGround (image 7 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Access DNS records in SiteGround" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Access DNS records in SiteGround" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 7 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

3Add the 1st TXT record (SPF)

Fields

A. Click on the TXT tab.

B. Name: different for everyone — do not include the root domain.

  • mg.companyname.com → host name is mg
  • replies.companyname.com → host name is replies
  • Main domain (companyname.com) → host name is @, or leave it empty

C. Value: the same for everyone — paste v=spf1 include:mailgun.org ~all.

D. Click Create.

Add the 1st TXT record (SPF) (image 8 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 1st TXT record (SPF)" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 1st TXT record (SPF)" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 8 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

4Add the 2nd TXT record (DKIM)

Click + Add Record again.

Add the 2nd TXT record (DKIM) (image 9 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 9 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Fields

A. Click on the TXT tab.

B. Name: this part is a little tricky. Copy everything from the beginning of the value up until the subdomain part — do not include the root domain. Everyone's 2nd TXT record name and value are different.

ExampleName to copyHighlighted part
Using a subdomainmx._domainkey.helpdesk
Add the 2nd TXT record (DKIM) (image 10 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 10 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Using the main domainmailo._domainkey
Add the 2nd TXT record (DKIM) (image 11 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 11 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

C. Value: head back to Mailgun and copy the 2nd, much longer TXT record — highlighted in the screenshot below — and paste it here.

Add the 2nd TXT record (DKIM) (image 12 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 2nd TXT record (DKIM)" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 12 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

D. Click Create.

5Add the 1st MX record

Add the 1st MX record (image 13 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 13 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

Click on the MX tab, then select Add your own MX records.

Add the 1st MX record (image 14 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 14 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Heads Up

If you have a Google Workspace account capturing incoming email for your main domain, make sure you're using a subdomain for Mailgun instead. See Can I Use the Same Domain Name for Mailgun and for Google Apps (Or Another Email Server)?

Add the 1st MX record (image 15 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 1st MX record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 15 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Fields

A. Name: different for everyone —

  • mg.companyname.com → host name is mg
  • replies.companyname.com → host name is replies
  • Main domain → host name is @

B. Priority: 10 — the same for everyone, no matter what domain you're setting up.

C. Destination: the same for everyone — paste mxa.mailgun.org.

D. Click Create.

6Add the 2nd MX record

Add another MX record. This time the destination will be mxb.mailgun.org.

Add the 2nd MX record (image 16 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the 2nd MX record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the 2nd MX record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 16 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Fields

A. Name: different for everyone —

  • mg.companyname.com → host name is mg
  • replies.companyname.com → host name is replies
  • Main domain → host name is @

B. Priority: 10 — the same for everyone.

C. Destination: the same for everyone — paste mxb.mailgun.org.

D. Click Create.

7Add the CNAME record

Add the CNAME record (image 17 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 17 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Add the CNAME record (image 18 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 18 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Fields

A. Click on the CNAME tab.

B. Name: different for everyone. Head back to Mailgun to copy the host name — copy everything from the beginning up until the subdomain part, do not copy the main domain.

Add the CNAME record (image 19 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 19 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
  • mg.companyname.com → host name is email.mg
  • replies.companyname.com → host name is email.replies
  • Main domain (companyname.com) → host name is email

C. Resolves to: the same for everyone — paste mailgun.org.

D. Click Create.

Add the CNAME record (image 20 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Add the CNAME record" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 20 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.

8Verify DNS & finish setup

Now that you've added all 5 records, go back to Mailgun and click Verify DNS Settings. If some records still aren't showing a green checkmark, click the same button again — DNS propagation can take a little time.

Verify DNS & finish setup (image 21 of 21) What this shows Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What this shows Illustrates the "Verify DNS & finish setup" section of "Mailgun Setup - Siteground Domain Setup". This screenshot appears in the "Verify DNS & finish setup" section of "Mailgun Setup - Siteground Domain Setup". For context, this section explains: Email Infrastructure Mailgun + SiteGround Domain Setup Step-by-step DNS configuration for connecting Mailgun to a domain hosted with SiteGround. What You'll Learn This guide walks through signing up for Mailgun, adding your domain, and configuring the five DNS records Mailgun requires — two TXT…. This part of the guide covers 6 fields, listed below. Image 21 of 21
Fields in this part of the guide mg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referenced Sending → Add New Domaincompanyname.comANYTHING_HEREUSAdd domainSite Tools → Domain → DNS Zone EditorCreate New RecordA.TXTdo not include the root domain.mgreplies
Example values
Main domain (companyname.com) → host name is email
priya.raman@northgatedental.com

Illustrative values showing the expected format. They are not read from the screenshot.

All 2 steps in this procedure
  1. Main domain: if you use the main domain, it should not also be used with Google Workspace or any other email provider — see Mailgun's guidance on sharing a domain with another email server.
  2. Subdomain: type ANYTHING_HERE.companyname.com — for example mg.companyname.com, replies.companyname.com, or support.companyname.com.
Next Steps

Once all records are verified, grab your Mailgun API key and add it to your email service settings.

Then send a test email to confirm everything works — see how to send a test email in the Conversation.

9Frequently Asked Questions

Q: Where do I find the DNS Zone Editor in SiteGround?
Log in to SiteGround, then go to Site Tools → Domain → DNS Zone Editor. From there you can add TXT, MX, and CNAME records for your domain.
Q: What if "Add your own MX records" isn't available?
This option appears under the MX tab in the DNS Zone Editor. If you don't see it, confirm you're on the correct domain and that email hosting isn't locked to a different provider in your SiteGround plan.
Q: Should I leave the Name field empty or use @ for the main domain?
Either works in SiteGround's DNS Zone Editor — both represent the root domain. Use whichever the field accepts without an error.
Q: Will this affect my existing Google Workspace or Gmail email?
Not if you use a subdomain for Mailgun rather than your main domain, and leave your existing MX records for Google Workspace untouched on the main domain.
Q: How long does DNS propagation take with SiteGround?
Usually fast, but it can occasionally take a few hours. If a record isn't showing green yet in Mailgun, wait a bit and click Verify DNS Settings again.
Q: What do I do after all 5 records show a green checkmark?
Grab your Mailgun API key, add it to your email service settings, and send a test email in a conversation to confirm delivery is working.

Was this guide helpful?

Related guides