To set up Mailgun DNS records on Namecheap for GoHighLevel, access your Namecheap domain's Advanced DNS settings and add the required TXT, MX, and CNAME records from your Mailgun account. This process typically takes 15-20 minutes, plus DNS propagation time.
Key Takeaways
✓Always use a subdomain for Mailgun if your root domain handles existing email (like GSuite) to prevent service interruption.
✓Carefully copy Mailgun's provided hostnames and values; even small typos prevent verification.
✓DNS propagation can take up to 48 hours, so records may not verify instantly.
✓Verify all records in your Mailgun account after adding them to Namecheap to ensure correct setup.
✓If using GSuite on your main domain, re-add its MX records to Namecheap after switching to Custom MX settings.
Prepare Your Namecheap and Mailgun Accounts
Before you begin adding DNS records, ensure you have access to both your Namecheap account and your Mailgun dashboard. You will need to switch between these platforms to copy specific record details and paste them into Namecheap's DNS settings. Having both open in separate tabs will streamline the process.
1
Log in to Namecheap — Access your Namecheap account and navigate to the Domain List. Locate the specific domain you intend to use with Mailgun and GoHighLevel.
0
2
Access Advanced DNS Settings — Click on the Manage button next to your domain in Namecheap. Then, select the Advanced DNS tab from the top menu to view your domain's DNS records.
1
3
Log in to Mailgun — Open your Mailgun account dashboard. Navigate to Sending → Domains and select the domain you are setting up to view its required DNS records.
2
⚠️ If your root domain (`yourdomain.com`) is currently receiving emails via another service (like GSuite), do NOT use the root domain for Mailgun. Use a subdomain instead to avoid interrupting your existing email service.
🔥 Pro Tip
Consider using a subdomain (e.g., `mg.yourdomain.com` or `replies.yourdomain.com`) for Mailgun. This prevents conflicts if your root domain (`yourdomain.com`) already handles email, like with GSuite or Microsoft 365.
Add the First TXT (SPF) Record
The first TXT record is crucial for email authentication, specifically the SPF (Sender Policy Framework) record. This record tells receiving mail servers which IP addresses are authorized to send email on behalf of your domain, helping prevent spam and spoofing.
1
Add a New DNS Record — In Namecheap's Advanced DNS tab, scroll to the Host Records section. Click the Add New Record button.
0
2
Select TXT Record Type — From the dropdown menu for Type, select TXT Record.
1
3
Enter the Host — In the Host field, enter the appropriate identifier: use `@` for your main domain (e.g., `yourdomain.com`), or enter the subdomain name (e.g., `mg` for `mg.yourdomain.com`, `replies` for `replies.yourdomain.com`).
2
4
Copy the SPF Value from Mailgun — Switch to your Mailgun domain settings. Locate the first TXT record, which typically starts with `v=spf1`. Copy the entire value: `v=spf1 include:mailgun.org ~all`.
3
5
Paste the Value — Return to Namecheap and paste the copied SPF record into the Value field.
4
6
Save the Record — Click the green checkmark icon to save your new TXT record.
5
Add the Second TXT (DKIM) Record
The second TXT record is for DKIM (DomainKeys Identified Mail) authentication. DKIM adds a digital signature to your outgoing emails, allowing receiving servers to verify that the email truly came from your domain and was not altered in transit. This significantly improves email deliverability.
1
Add Another New DNS Record — In Namecheap's Advanced DNS tab, click Add New Record again.
2
Select TXT Record Type — From the Type dropdown, select TXT Record.
0
3
Enter the DKIM Host — Switch to Mailgun and find the second TXT record. Copy only the hostname part provided by Mailgun (e.g., `k1._domainkey.mg` or `k1._domainkey.replies`). Paste this into Namecheap's Host field.
4
Copy the DKIM Value from Mailgun — In Mailgun, copy the entire long string of characters provided as the value for the second TXT record.
1
5
Paste the DKIM Value — Return to Namecheap and paste the copied DKIM value into the Value field.
6
Save the Record — Click the green checkmark icon to save this second TXT record.
2
🔥 Pro Tip
Ensure you copy the *exact* hostname from Mailgun for the DKIM record. It's often unique and includes a `._domainkey` segment.
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.
Configure MX (Mail Exchange) Records
MX records tell other mail servers where to send incoming emails for your domain. For Mailgun, you typically add two MX records. If you use your main domain for Mailgun and also for services like GSuite, this step requires careful attention to avoid disrupting your existing email service.
1
Navigate to Mail Settings — In Namecheap's Advanced DNS tab, scroll down to the MAIL SETTINGS section.
2
Set Mail Settings to Custom MX — From the dropdown menu, switch the setting from its current value (e.g., 'Gmail') to Custom MX.
3
Re-add Existing GSuite MX Records (If Applicable) — If you are using your root domain for Mailgun AND for GSuite/Gmail, you MUST re-add the 5 standard GSuite MX records here. Failing to do so will cause your GSuite emails to stop working. Skip this step if you are using a subdomain for Mailgun or not using GSuite.
4
Add the First Mailgun MX Record — In the Host Records section (or the Mail Settings section if it allows adding new records directly), click Add New Record. Enter the appropriate Host (`@` for main domain, `mg` or `replies` for subdomains).
5
Enter First MX Value and Priority — Set the Value to `mxa.mailgun.org` and the Priority to `10`.
6
Save the First MX Record — Click the green checkmark icon to save this MX record.
7
Add the Second Mailgun MX Record — Click Add New Record again. Enter the same Host as the first MX record (`@`, `mg`, or `replies`).
8
Enter Second MX Value and Priority — Set the Value to `mxb.mailgun.org` and the Priority to `10`.
9
Save the Second MX Record — Click the green checkmark icon to save this second MX record.
0
⚠️ Changing MAIL SETTINGS to Custom MX can override existing email configurations. If you use GSuite for your main domain, you must immediately add back the 5 Google MX records (e.g., `ASPMX.L.GOOGLE.COM` with priority 1, `ALT1.ASPMX.L.GOOGLE.COM` with priority 5, etc.) BEFORE adding Mailgun's MX records to ensure continuous email delivery.
🔥 Pro Tip
Always double-check the MX records if your domain handles incoming emails for other services. A misconfiguration here can lead to lost emails.
Add the CNAME (Tracking) Record
The CNAME record allows Mailgun to track email opens, clicks, and other engagement metrics for your sent emails. This is essential for gaining insights into your email campaign performance within GoHighLevel.
1
Return to Host Records — Scroll back up to the Host Records section in Namecheap's Advanced DNS tab.
0
2
Add a New CNAME Record — Click Add New Record and select CNAME Record from the Type dropdown.
1
3
Enter the CNAME Host — Switch to Mailgun and locate the CNAME record. Copy only the hostname part provided by Mailgun (e.g., `email.mg` for `email.mg.yourdomain.com` or `email.replies` for `email.replies.yourdomain.com`). Paste this into Namecheap's Host field.
2
4
Enter the CNAME Value — Set the Value field to `mailgun.org`.
3
5
Save the CNAME Record — Click the green checkmark icon to save your new CNAME record.
4
🔥 Pro Tip
The CNAME record's hostname is usually `email` followed by your subdomain (e.g., `email.mg`). Double-check Mailgun's exact instruction for your specific setup.
Verify DNS Settings in Mailgun
After adding all the required DNS records in Namecheap, the final step is to verify them within your Mailgun account. This confirms that the records are correctly configured and have started to propagate across the internet.
1
Initiate DNS Verification — Return to your Mailgun domain settings page. Click the Verify DNS Settings button.
2
Re-verify If Necessary — If some records do not show a green checkmark immediately, wait a few minutes and click Verify DNS Settings again. DNS propagation can take time.
3
Confirm All Records Verified — Ensure all required TXT, MX, and CNAME records show a green checkmark in Mailgun before proceeding to integrate with GoHighLevel.
✅ Once all records are verified in Mailgun, you are ready to obtain your Mailgun API Key and integrate it with your GoHighLevel account for sending emails.
🔥 Pro Tip
DNS changes can take anywhere from a few minutes to 48 hours to fully propagate. Be patient and re-check periodically if verification doesn't happen instantly.
Troubleshooting Common Issues
⚠️ Mailgun DNS records are not verifying after several hours.
Double-check every record in Namecheap against Mailgun's exact instructions for typos, incorrect hostnames, or missing values. Ensure no conflicting records exist. DNS propagation can take up to 48 hours; try verifying again later.
⚠️ Emails are not sending from GoHighLevel after Mailgun setup.
Verify that your Mailgun API key is correctly entered in GoHighLevel. Check the Mailgun logs for error messages. Ensure all DNS records show as verified in Mailgun. Test sending directly from Mailgun to isolate the issue.
⚠️ My existing GSuite (Gmail) emails stopped working after changing MX records.
You likely did not re-add the 5 standard GSuite MX records to Namecheap after switching to 'Custom MX' settings. Go back to Namecheap's Mail Settings, ensure 'Custom MX' is selected, and add all GSuite MX records with their correct priorities, then add Mailgun's MX records.
⚠️ Mailgun shows 'Hostname already in use' for a record.
This usually means you already have a record with the same hostname. Delete any old or conflicting records in Namecheap's Advanced DNS settings, then re-add the Mailgun record. If using a subdomain, ensure you're not trying to use the root domain's hostname.
⚠️ The Mailgun CNAME record is not verifying.
Confirm the CNAME's Host in Namecheap exactly matches the specific hostname Mailgun provides (e.g., `email.mg` or `email.replies`), and the Value is precisely `mailgun.org`. Check for extra spaces or incorrect characters.
Common Mistakes to Avoid
→Forgetting to re-add existing GSuite/Microsoft 365 MX records when switching Namecheap's Mail Settings to 'Custom MX'.
→Incorrectly copying the hostname for the second TXT (DKIM) or CNAME record, often including the main domain by mistake.
→Not waiting long enough for DNS changes to propagate before attempting to verify records in Mailgun.
→Using the root domain for Mailgun when another email service already uses it, leading to email delivery conflicts.
→Missing a green checkmark on even one record in Mailgun, which prevents full functionality.
Frequently Asked Questions
QWhy do I need to re-add GSuite MX records if I'm setting up Mailgun?
When you change your domain's **MAIL SETTINGS** in Namecheap to **Custom MX**, it overrides any pre-existing MX records, including those for GSuite. If your main domain receives emails through GSuite, you must manually add its 5 specific MX records back to Namecheap's DNS to ensure incoming GSuite emails continue to be delivered correctly, alongside Mailgun's MX records for sending.
QHow long does it typically take for DNS records to propagate and verify?
DNS propagation can vary widely. It often takes a few minutes to a few hours for records to update globally, but it can sometimes take up to 48 hours. If Mailgun doesn't verify immediately, wait an hour or two and try again. Patience is key with DNS changes.
QWhat is the difference between a root domain and a subdomain for Mailgun setup?
A root domain is your primary domain (e.g., `yourcompany.com`). A subdomain is a prefix added to your root domain (e.g., `mg.yourcompany.com` or `replies.yourcompany.com`). Using a subdomain for Mailgun is highly recommended if your root domain already handles email with another provider like GSuite, preventing conflicts and ensuring both services function correctly.
QWhere exactly do I find the specific hostnames and values in Mailgun for each record?
After adding your domain in Mailgun, navigate to **Sending → Domains** and click on your domain. Mailgun will display a list of required DNS records (TXT, MX, CNAME) with explicit **Hostname** and **Enter This Value** columns. Copy these details precisely as they appear in your Mailgun dashboard for each record.
QWhat should I do if some Mailgun records verify but others don't?
First, re-check the unverified records in Namecheap for any typos in the hostname or value. Ensure no extra spaces. Confirm the record type (TXT, MX, CNAME) is correct. If everything looks right, wait a few more hours, clear your browser cache, and try verifying again in Mailgun. Sometimes, local DNS caches can delay seeing the updates.
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.