To set up Mailgun for email sending with a Siteground domain in GoHighLevel, you need to add specific TXT, MX, and CNAME DNS records within your Siteground Site Tools → DNS Zone Editor. This process typically takes about 15-20 minutes to complete the record entry, with propagation taking up to 24-48 hours.
Key Takeaways
✓Always verify DNS records in Mailgun after adding them to Siteground.
✓Pay close attention to the 'Name' (Host) field for each record, as it varies based on your chosen subdomain.
✓Use a dedicated subdomain for Mailgun to avoid conflicts, especially if your main domain handles other email services.
✓DNS changes can take time to propagate; be patient and re-verify if needed after an hour or two.
✓Incorrect DNS records are the primary cause of email delivery issues in GoHighLevel.
How to Add Your First TXT (SPF) Record
The first TXT record, often called an SPF record, tells receiving email servers that Mailgun is authorized to send emails on behalf of your domain. This is crucial for preventing your emails from being marked as spam. You will start by logging into your Siteground account to access your domain's DNS settings.
1
Log in to Siteground — Access your Siteground account dashboard. This gives you control over your domain settings.
2
Navigate to DNS Zone Editor — Go to Site Tools → Domain → DNS Zone Editor. You will manage all your domain's records here.
0
3
Select TXT Record Type — In the 'Create New Record' section, click the TXT tab. This prepares the form for adding a new TXT record.
4
Enter the Name (Host) for your TXT Record — Type the appropriate host name based on your setup. If using a subdomain like `mg.yourdomain.com`, enter `mg`; for `replies.yourdomain.com`, enter `replies`. For a main domain like `yourdomain.com`, use `@` or leave it empty.
1
5
Enter the Value (Content) for your TXT Record — Paste `v=spf1 include:mailgun.org ~all` into the Value field. This is the standard SPF record for Mailgun.
6
Create the Record — Click Create. This saves your first TXT record to your domain's DNS.
2
🔥 Pro Tip
Always use a subdomain (e.g., `mg.yourdomain.com`) for Mailgun. This prevents conflicts if your main domain is already set up for other email services like Google Workspace.
How to Add Your Second TXT (DKIM) Record
The second TXT record provides a DKIM (DomainKeys Identified Mail) signature, which further authenticates your emails. This record is unique to your Mailgun account and helps prevent email spoofing, significantly improving your email deliverability and sender trust.
1
Add Another Record — Click + Add Record again in the DNS Zone Editor. This opens a new record creation form.
2
Select TXT Record Type — Click the TXT tab. This ensures you are adding another TXT record.
0
3
Retrieve Mailgun's DKIM Hostname — Go to your Mailgun account dashboard and locate the DKIM record details for your domain. Copy only the hostname portion provided by Mailgun, excluding your root domain (e.g., if Mailgun shows `k1._domainkey.mg.yourdomain.com`, copy `k1._domainkey.mg`).
4
Enter the Name (Host) for your TXT Record — Paste the copied Mailgun DKIM hostname into the Name field in Siteground. This links the DKIM record to your specific Mailgun setup.
1
5
Retrieve Mailgun's DKIM Value — Return to your Mailgun account and copy the entire DKIM record value (the long string of characters) provided.
6
Enter the Value (Content) for your TXT Record — Paste the copied DKIM value into the Value field in Siteground. This completes the DKIM authentication string.
2
7
Create the Record — Click Create. Your second TXT record is now added.
⚠️ The 'Name' and 'Value' for this DKIM record are unique to your Mailgun account. Do not use examples from other guides; always copy directly from your Mailgun domain settings.
How to Add Your First MX Record
MX (Mail Exchanger) records tell other mail servers where to send incoming email for your domain. While Mailgun is primarily for sending, these records are still necessary for complete domain verification and can handle bounce messages. You will add two MX records.
1
Select MX Record Type — In the DNS Zone Editor, click the MX tab. Then, select Add your own MX records. This prepares the form for an MX record.
2
Enter the Name (Host) for your MX Record — Type the appropriate host name. If using `mg.yourdomain.com`, enter `mg`. For `replies.yourdomain.com`, enter `replies`. If setting up a main domain, enter `@`.
0
3
Set the Priority — Enter `10` in the Priority field. This priority is standard for Mailgun MX records.
4
Enter the Destination — Paste `mxa.mailgun.org` into the Destination field. This directs incoming mail to Mailgun's primary server.
1
5
Create the Record — Click Create. Your first MX record is now saved.
✅ If your main domain uses Google Workspace (Gsuite) or another email service for incoming mail, ensure you are using a subdomain for Mailgun. Adding Mailgun MX records to your main domain will redirect all incoming mail to Mailgun, potentially disrupting your existing email service.
Try GoHighLevel Free
Start your 30-day GoHighLevel free trial
Everything in this guide is in your free trial. 30 days, no credit card — the platform behind 78+ revenue systems.
Some links are affiliate links — if you sign up we may earn a commission, at no extra cost to you. We only recommend GoHighLevel because we build on it every day.
How to Add Your Second MX Record
Adding a second MX record provides redundancy for incoming email delivery. If the primary Mailgun MX server is unavailable, mail can still be delivered through the secondary server, ensuring better reliability for bounce handling and domain verification.
1
Add Another MX Record — Click + Add Record again, then select the MX tab. This allows you to add the second MX record.
2
Enter the Name (Host) for your MX Record — Use the same host name as your first MX record. For `mg.yourdomain.com`, enter `mg`. For a main domain, enter `@`.
3
Set the Priority — Enter `10` in the Priority field. Both Mailgun MX records use the same priority.
4
Enter the Destination — Paste `mxb.mailgun.org` into the Destination field. This points to Mailgun's secondary mail server.
5
Create the Record — Click Create. You have now added both required MX records.
0
How to Add the CNAME Record and Verify DNS Settings
The CNAME record is essential for email tracking, allowing GoHighLevel to monitor opens, clicks, and other engagement metrics for your emails sent through Mailgun. After adding this final record, you will verify all your DNS settings within Mailgun.
1
Select CNAME Record Type — In the DNS Zone Editor, click the CNAME tab. This prepares the form for a CNAME record.
2
Retrieve Mailgun's CNAME Hostname — Go back to your Mailgun account dashboard and find the CNAME record details. Copy only the hostname part, excluding your root domain (e.g., if Mailgun shows `email.mg.yourdomain.com`, copy `email.mg`).
0
3
Enter the Name (Host) for your CNAME Record — Paste the copied Mailgun CNAME hostname into the Name field in Siteground. This sets up the tracking subdomain.
4
Enter the Resolves To Value — Paste `mailgun.org` into the Resolves to field. This points your tracking subdomain to Mailgun's tracking service.
1
5
Create the Record — Click Create. All five DNS records are now added to Siteground.
6
Verify DNS Settings in Mailgun — Return to your Mailgun account and click the Verify DNS Settings button. Mailgun will check if the records are correctly propagated.
2
7
Re-verify if Needed — If some records do not show a green checkmark immediately, wait 30-60 minutes and click Verify DNS Settings again. DNS propagation can take time.
8
Obtain Mailgun API Key — Once all records are verified, locate and copy your Mailgun API key. You will need this to connect Mailgun to GoHighLevel.
3
9
Send a Test Email — After connecting Mailgun to GoHighLevel with your API key, send a test email from a contact record in GoHighLevel to confirm everything works correctly.
✅ After successfully verifying all DNS records, you must connect your Mailgun account to GoHighLevel using your Mailgun API key. This is the final step to enable email sending from your GoHighLevel account.
🔥 Pro Tip
If records don't verify after an hour, double-check each entry for typos, especially in the 'Name' fields. Often, a single missing dot or character is the culprit.
Troubleshooting Common Issues
⚠️ DNS records not verifying in Mailgun.
Double-check each record in Siteground for typos. Ensure the 'Name' (Host) and 'Value' (Content/Destination) fields exactly match what Mailgun provides, paying special attention to subdomains. Wait at least 30-60 minutes and try verifying again.
⚠️ Emails not sending from GoHighLevel after setup.
Verify that your Mailgun API key is correctly entered in GoHighLevel under Settings → Email Services → Mailgun. Also, ensure all DNS records show green checkmarks in Mailgun.
⚠️ Emails are going to spam folders.
This often indicates an issue with your SPF or DKIM records. Re-verify your first two TXT records in Siteground and Mailgun. Ensure the SPF record `v=spf1 include:mailgun.org ~all` is present and correct, and the DKIM record is fully propagated.
⚠️ Existing email (e.g., Google Workspace) stopped working after Mailgun setup.
You likely added Mailgun MX records to your main domain instead of a subdomain. Delete the Mailgun MX records from your main domain in Siteground and add them to a dedicated subdomain for Mailgun.
⚠️ Mailgun shows 'Pending' for days.
This usually means the DNS records are not yet propagated or are incorrect. Use an online DNS lookup tool (e.g., `mxtoolbox.com`) to check your domain's records. If they don't appear, re-enter them carefully in Siteground.
Common Mistakes to Avoid
→Including the root domain in the 'Name' field: Users often copy the full Mailgun-provided hostname, which already includes the root domain, leading to incorrect entries like `mg.yourdomain.com.yourdomain.com`. Only enter the subdomain part (e.g., `mg`).
→Typos in DNS record values: Even a single character error in the Value, Destination, or Resolves To fields will prevent verification and email delivery.
→Incorrectly setting the 'Priority' for MX records: While Mailgun MX records both use priority 10, other email services might use different priorities. Always ensure Mailgun's are set to 10.
→Not waiting for DNS propagation: DNS changes are not instant. Verifying immediately after adding records will often show them as unverified. Patience is key.
→Using the main domain for Mailgun when another email service is active: This creates conflicts for incoming mail. Always use a dedicated subdomain (e.g., `mg.yourdomain.com`) for Mailgun.
Frequently Asked Questions
QHow long does it take for DNS records to propagate after adding them in Siteground?
DNS propagation can vary widely, but typically, it takes anywhere from a few minutes to several hours. In some cases, it might take up to 24-48 hours for changes to fully update across the internet. You should wait at least 30-60 minutes before re-verifying in Mailgun.
QCan I use my main domain (e.g., yourdomain.com) for Mailgun setup if I already use it for Google Workspace?
It is strongly recommended to use a subdomain (e.g., `mg.yourdomain.com` or `replies.yourdomain.com`) for Mailgun if your main domain is already handling email for another service like Google Workspace. Adding Mailgun MX records to your main domain will likely interfere with your existing incoming email service.
QWhat should I do if Mailgun isn't verifying my DNS records even after waiting several hours?
First, meticulously re-check each DNS record in your Siteground DNS Zone Editor against the exact values provided by Mailgun. Pay close attention to the 'Name' (Host) field, ensuring you've only entered the subdomain part. Use an online DNS lookup tool to confirm the records are visible publicly. If issues persist, contact Siteground support to check your DNS settings.
QWhy do I need both TXT, MX, and CNAME records for Mailgun?
Each record serves a specific purpose for reliable email delivery. TXT records (SPF and DKIM) authenticate your domain, proving Mailgun is authorized to send emails on your behalf and preventing spoofing. MX records handle incoming mail, including bounces. The CNAME record enables email tracking for opens and clicks within GoHighLevel.
QAfter setting up Mailgun with Siteground, where do I put the Mailgun API key in GoHighLevel?
Once your Mailgun domain is fully verified, you will find your API key in your Mailgun account. In GoHighLevel, navigate to **Settings → Email Services**. Select the Mailgun option and paste your API key there to connect your sending service.
Try GoHighLevel Free
Start your 30-day GoHighLevel free trial
Everything in this guide is in your free trial. 30 days, no credit card — the platform behind 78+ revenue systems.
Some links are affiliate links — if you sign up we may earn a commission, at no extra cost to you. We only recommend GoHighLevel because we build on it every day.
Arsalan Zaffar
Revset Labs · Revenue Systems · 78+ GHL Builds
Arsalan writes GHL guides from real build experience — 78+ systems, $9.2M in client pipeline. Wharton, CXL & Google certified.