Step-by-step DNS record setup for Mailgun across GoDaddy, Namecheap, Cloudflare, Google Domains, SiteGround, and HostGator.
When you set up a dedicated sending domain with Mailgun, you need to add specific DNS records at your domain registrar. The record values come from Mailgun, but where and how you enter them varies by registrar.
Before starting, open your Mailgun dashboard and navigate to Sending > Domains > DNS Records to get your specific record values. The records below use placeholder values — always copy the exact values from your Mailgun account.
Log in to GoDaddy, go to My Products, find your domain, and click DNS (or Manage DNS).
2
Add MX records
Click Add under the DNS Records section. Set Type to MX, Host to your subdomain (e.g., ), Points to as , and Priority to . Repeat for with priority .
3
Add SPF TXT record
Click Add, set Type to TXT, Host to your subdomain, and TXT Value to .
4
Add DKIM TXT record
Click Add, set Type to TXT, Host to the DKIM selector from Mailgun (e.g., ), and paste the full DKIM value.
GoDaddy has a 1024-character limit for TXT records. If your DKIM key is longer, you may need to split it across two quoted strings. Mailgun support can help with this.
5
Add CNAME record
Click Add, set Type to CNAME, Host to (or the tracking subdomain from Mailgun), and Points to as .
6
Verify in Mailgun
Return to your Mailgun dashboard and click Verify DNS Settings. Allow up to 48 hours for propagation.
GoDaddy sometimes appends your domain to the Host field automatically. If the Host should be , enter only — GoDaddy adds the rest.
1
Open advanced DNS
Log in to Namecheap, go to Domain List, click Manage next to your domain, then select the Advanced DNS tab.
2
Add MX records
Click Add New Record, select MX, set Host to your subdomain, Value to , and Priority to . Repeat for .
3
Add TXT records
Add SPF and DKIM TXT records with the appropriate host names and values from Mailgun.
4
Add CNAME record
Add the CNAME record for email tracking pointing to .
5
Verify
Save all records and verify in Mailgun. Namecheap DNS typically propagates within 30 minutes.
1
Open DNS settings
Log in to Cloudflare, select your domain, and click DNS in the sidebar.
2
Add all records
Add MX, SPF TXT, DKIM TXT, and CNAME records using Cloudflare’s Add record button.
Turn off the Cloudflare proxy (orange cloud) for all Mailgun DNS records. MX, TXT, and CNAME records used for email must be DNS-only (grey cloud). Proxied records will break email delivery.
3
Verify
Verify in Mailgun. Cloudflare DNS changes propagate within minutes.
1
Open DNS settings
Log in to Google Domains (or Squarespace Domains if migrated), select your domain, and click DNS in the left sidebar.
2
Add custom records
Scroll to the Custom records section and add MX, TXT (SPF and DKIM), and CNAME records with the values from your Mailgun dashboard.
3
Verify
Save and verify in Mailgun. Google Domains propagation is typically under 1 hour.
1
Open DNS zone editor
Log in to SiteGround, go to Websites > Site Tools > Domain > DNS Zone Editor.
2
Add records
Use the record type tabs (MX, TXT, CNAME) to add all required Mailgun records.
3
Verify
Save and verify in Mailgun.
1
Open DNS management
Log in to HostGator cPanel and search for Advanced DNS Zone Editor.
2
Add records
Add MX, TXT (SPF and DKIM), and CNAME records using the zone editor.
3
Verify
Save all records and verify in Mailgun. HostGator propagation can take up to 24 hours.