Skip to main content

How to Connect Mailgun to Your DNS Manager

This article explains how to add and verify Mailgun DNS records so Kyrios can send compliant, high-deliverability emails from your domain.

Updated over 3 months ago

Who This Is For / When to Use

This guide is for Kyrios users who are setting up email sending and need to authenticate a domain or subdomain with Mailgun to enable reliable outbound email delivery.


What Connecting Mailgun to DNS Does

Connecting Mailgun to your DNS manager verifies domain ownership and authorizes Mailgun to send email on your behalf. This process improves deliverability, enables tracking and unsubscribe compliance, and prevents spoofing or spam filtering issues.

Mailgun requires specific DNS records (TXT, MX, and CNAME) to be added before email sending is enabled.


Step 1: Create and Verify a Mailgun Account

You must have an active and verified Mailgun account before adding DNS records.

  1. Create a Mailgun account.

  2. Verify both your email address and phone number.

  3. Choose a paid plan if you plan to send production-level email volume.


Step 2: Add a Sending Domain in Mailgun

A dedicated sending domain or subdomain should be used for email to protect your primary domain reputation.

  1. In Mailgun, open the left navigation.

  2. Go to Send → Sending → Domain Settings.

  3. Click Add new domain.

  4. Enter your domain or subdomain (example: mg.yourdomain.com).

  5. Select the appropriate region (US or EU).

  6. Choose Shared IP unless a dedicated IP has been provided.

  7. Click Add Domain.


Step 3: Locate DNS Records in Mailgun

After adding the domain, Mailgun generates the DNS records required for verification.

You will see:

  • 2 TXT records (for SPF and DKIM)

  • 2 MX records (for bounce and reply handling)

  • 1 CNAME record (for tracking)

These values are unique to your domain and must be copied exactly.


Step 4: Add DNS Records to Your DNS Manager

All DNS records must be added in your DNS provider (for example: Cloudflare, GoDaddy, Namecheap).

TXT Records

TXT records authorize Mailgun to send email and sign messages.

  • Type: TXT

  • Host: Use only the subdomain portion (example: mailo._domainkey.mg)

  • Value: Paste the full value from Mailgun

  • TTL: Default (1 hour)

Repeat for the second TXT record.


MX Records

MX records route bounces and replies correctly.

  • Type: MX

  • Host: Use the subdomain only (example: mg)

  • Points to: Value provided by Mailgun

  • Priority: 10

  • TTL: Default (1 hour)

Repeat for the second MX record.


CNAME Record (Tracking)

The CNAME record enables click and open tracking.

  • Type: CNAME

  • Host: email.mg (example)

  • Points to: Value provided by Mailgun

  • TTL: Default (1 hour)

[Screenshot Placeholder: 1763722656986-unnamed - 2025-11-21T185727.869.png — DNS record type dropdown showing CNAME]


Step 5: Verify DNS Settings in Mailgun

Once all records are added:

  1. Return to Mailgun Domain Settings.

  2. Click Verify DNS Settings.

  3. Confirm that all five records show a green checkmark.

If records do not verify immediately, wait up to 24–48 hours for DNS propagation.


Step 6: Enable Tracking and Unsubscribe Settings (Optional but Recommended)

Mailgun tracking and unsubscribe settings ensure compliance and campaign visibility.

  1. In Domain Settings, scroll to Tracking.

  2. Enable Click tracking and Open tracking.

  3. Enable Unsubscribes.

  4. Set the tracking protocol to HTTPS.

  5. Click Save.


How to Enable Unsubscribe Tracking Specifically

Unsubscribe tracking automatically inserts unsubscribe links into email footers.

  1. Go to Send → Sending → Domain Settings.

  2. Select your domain from the dropdown.

  3. Scroll to Unsubscribes.

  4. Click Edit.

  5. Toggle On.

  6. Click Save unsubscribe tracking settings.


Common Issues and Fixes

DNS Records Will Not Verify

Cause: Incorrect host values or incomplete propagation. Fix: Ensure the host field contains only the subdomain portion, not the full domain. Wait up to 48 hours before retrying.

Tracking Warning Message Appears

Cause: CNAME record is missing or incorrect. Fix: Confirm the tracking CNAME record exists and matches Mailgun exactly.

Emails Go to Spam

Cause: Domain not fully authenticated or warmed up. Fix: Verify all DNS records, enable tracking, and gradually increase sending volume.

Did this answer your question?