Mailgun Setup with SiteGround DNS for Sparkforge
To connect Mailgun to a SiteGround domain, add SPF and DKIM TXT records, two MX records, and a CNAME in Site Tools > DNS Zone Editor, then verify in Mailgun and send a test from Sparkforge.
SiteGround's Site Tools panel exposes a clean DNS Zone Editor that handles all five Mailgun records. Plan for 15 minutes plus DNS propagation.
Before you start
- Sign up at mailgun.com and verify the email address.
- In Mailgun, click Sending > Add New Domain.
- Pick a subdomain like
mg.companyname.com. Avoid the root domain if it's already in use for email. - Set the region to US, not EU. Sparkforge only reads US-region Mailgun domains.
- Click Add domain and leave the DNS instructions open.
Add DNS records in SiteGround
Log in to SiteGround, open Site Tools > Domain > DNS Zone Editor.
1st TXT record (SPF)
- Click the TXT tab.
- Name: subdomain prefix (
mg) or@/empty for root. - Value:
v=spf1 include:mailgun.org ~all - Click Create.
2nd TXT record (DKIM)
- Click + Add Record, then the TXT tab.
- Name: copy the host prefix from Mailgun, stripping the root domain. Example:
mx._domainkey.helpdesk. - Value: paste the long DKIM string from Mailgun.
- Click Create.
1st MX record
- Click the MX tab and choose Add your own MX records.
- Name: subdomain prefix or
@for root. - Priority: 10
- Destination:
mxa.mailgun.org - Click Create.
2nd MX record
- Add another MX record.
- Name: same as the first MX.
- Priority: 10
- Destination:
mxb.mailgun.org - Click Create.
CNAME record
- Click the CNAME tab.
- Name: for
mg.companyname.comuseemail.mg; for root domain useemail. - Value:
mailgun.org - Click Create.
Verify and test
- Return to Mailgun and click Verify DNS Settings.
- If records are still red, wait a few minutes and re-verify. SiteGround propagation is usually fast.
- Copy the Mailgun API key into Sparkforge.
- Send a test email from Conversations.
If you also use a Google Workspace account on the root domain for inbound mail, keep Mailgun on a subdomain so the MX records don't conflict.
Frequently Asked Questions
Where is the DNS editor in SiteGround?
In Site Tools, open Domain > DNS Zone Editor. The legacy cPanel interface is gone — all DNS work happens in Site Tools.
Can I use the SiteGround email forwarder alongside Mailgun?
Yes, as long as Mailgun lives on a different subdomain. SiteGround forwarders on the root domain don't interfere with mg.yourdomain.com.
Why are my records still red after 30 minutes?
The most common cause is the host name including the root domain. Strip the root domain so only the prefix remains. Re-verify after that.
Do I need both MX records?
Yes. mxa.mailgun.org and mxb.mailgun.org provide redundancy. Without both, inbound mail can drop during Mailgun maintenance windows.
Was this article helpful?
Thanks for the feedback.