EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records…
6 min read1,242 words27 explained imagesUpdated Wed, 1 Jul at 6:53 AM
Assistants need to reach this page over the internet. While it is only running on your machine, these two buttons will not be able to load it.
Each image has a one line explanation. Switch to full detail for the step it belongs to, the fields and buttons involved, examples and the whole procedure.
Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver.
What You'll Learn
This guide covers creating a Mailgun account, adding a sending domain, choosing between a main domain and a subdomain, and publishing the 5 required DNS records — 2 TXT, 2 MX, and 1 CNAME — inside Namecheap's Advanced DNS settings.
Check your email inbox to verify the email address you signed up with.
Verify Your Email Address (image 1 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Verify Your Email Address" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Verify Your Email Address" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 1 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Verify Your Email Address (image 2 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Verify Your Email Address" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Verify Your Email Address" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 2 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
3Add a New Domain in Mailgun
Log in to Mailgun and click Sending → Add New Domain.
Add a New Domain in Mailgun (image 3 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add a New Domain in Mailgun" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add a New Domain in Mailgun" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 3 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
4Choose a Main Domain or Subdomain
If your domain is companyname.com, you can set up either the main domain or a subdomain with Mailgun.
To set up a subdomain with Mailgun, you can type anything_here.companyname.com. Examples:
mg.companyname.com
replies.companyname.com
support.companyname.com
Note
Set up the domain or subdomain under the US region, not EU. Then click Add domain.
Choose a Main Domain or Subdomain (image 4 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Choose a Main Domain or Subdomain" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Choose a Main Domain or Subdomain" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 4 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Setup Guide
Now let's publish 5 DNS records in Namecheap
2 TXT records, 2 MX records, and 1 CNAME record — follow each sub-step carefully.
5Add Your DNS Records in Namecheap
Log in to Namecheap.com, then click Domain List → Manage.
Add Your DNS Records in Namecheap (image 5 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 5 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Click Advanced DNS — this is where we'll add all 5 DNS records.
Add Your DNS Records in Namecheap (image 6 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 6 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
DNS Record 1 of 5
To Add the 1st TXT Record
Click Add New Record.
Add Your DNS Records in Namecheap (image 7 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 7 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Select TXT Record from the dropdown.
Add Your DNS Records in Namecheap (image 8 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 8 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Add Your DNS Records in Namecheap (image 9 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 9 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
A. Host: depending on the subdomain you're setting up:
mg.companyname.com → host name is mg
replies.companyname.com → host name is replies
Main domain (companyname.com) → host name is @
B. Value: head back to Mailgun and copy the first TXT record — it will look like v=spf1 include:mailgun.org ~all — and paste it here.
Add Your DNS Records in Namecheap (image 10 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 10 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
C. Click the green check to save.
DNS Record 2 of 5
To Add the 2nd TXT Record
Click Add New Record again, and select TXT Record from the dropdown.
Add Your DNS Records in Namecheap (image 11 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 11 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Add Your DNS Records in Namecheap (image 12 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 12 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Add Your DNS Records in Namecheap (image 13 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 13 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
A. Host: this one is a bit tricky — copy everything from the beginning until the subdomain part. Do not copy the main domain.
Add Your DNS Records in Namecheap (image 14 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 14 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Examples — copy the highlighted part:
Scenario
Screenshot
Using a subdomain
Add Your DNS Records in Namecheap (image 15 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 15 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Using the main domain
Add Your DNS Records in Namecheap (image 16 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 16 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
B. Value: paste the second, longer TXT record from Mailgun here.
Add Your DNS Records in Namecheap (image 17 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 17 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
C. Click the green check to save.
DNS Record 3 of 5
To Add the 1st MX Record
Scroll down to Mail Settings and switch the dropdown to Custom MX.
Add Your DNS Records in Namecheap (image 18 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 18 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
Once all five MX records above are added back, add the Mailgun MX record. Click Add New Record.
Add Your DNS Records in Namecheap (image 19 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 19 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Add Your DNS Records in Namecheap (image 20 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 20 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
A. Host: depending on the subdomain you're setting up:
mg.companyname.com → host name is mg
replies.companyname.com → host name is replies
Main domain (companyname.com) → host name is @
B. Value: mxa.mailgun.org
C. Priority: 10
D. Click the green check to save.
Add Your DNS Records in Namecheap (image 21 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 21 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
DNS Record 4 of 5
To Add the 2nd MX Record
A. Host: depending on the subdomain you're setting up:
mg.companyname.com → host name is mg
replies.companyname.com → host name is replies
Main domain (companyname.com) → host name is @
B. Value: mxb.mailgun.org
C. Priority: 10
D. Click the green check to save.
Add Your DNS Records in Namecheap (image 22 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 22 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
DNS Record 5 of 5
To Add the CNAME Record
Scroll back up to the Host Records section and click Add New Record.
Add Your DNS Records in Namecheap (image 23 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 23 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Select CNAME Record from the dropdown.
Add Your DNS Records in Namecheap (image 24 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 24 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Head back to Mailgun to copy the host name — copy everything from the beginning until the subdomain part. Do not copy the main domain.
Add Your DNS Records in Namecheap (image 25 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 25 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
Go back to Namecheap:
Add Your DNS Records in Namecheap (image 26 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 26 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
All 3 steps in this procedure
mg.companyname.com
replies.companyname.com
support.companyname.com
A. Host: depending on the subdomain you're setting up:
mg.companyname.com → host name is email.mg
replies.companyname.com → host name is email.replies
Main domain (companyname.com) → host name is email
B. Value: mailgun.org
C. Click the green check to save.
Now that all 5 records have been added, go back to Mailgun and click Verify DNS Settings. Click the same button again if some records still aren't showing a green checkmark.
Add Your DNS Records in Namecheap (image 27 of 27)What this shows EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and…What this showsIllustrates the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup".This screenshot appears in the "Add Your DNS Records in Namecheap" section of "Mailgun Setup - Namecheap Domain Setup". For context, this section explains: EMAIL INFRASTRUCTURE Step-by-Step Mailgun Setup: Namecheap Domain Setup Sign up for Mailgun, add your domain, and publish the TXT, MX, and CNAME records in Namecheap so your emails verify and deliver. What You'll Learn This guide covers creating a Mailgun account, adding a sending domain, choosing…. This part of the guide covers 9 fields, listed below.Image 27 of 27
Fields in this part of the guidemg.companyname.comreplies.companyname.comsupport.companyname.commg.companyname.com → host name is mgreplies.companyname.com → host name is repliesMain domain (companyname.com) → host name is @mg.companyname.com → host name is email.mgreplies.companyname.com → host name is email.repliesMain domain (companyname.com) → host name is email
Buttons and menus referencedSending → Add New Domaincompanyname.comanything_here.companyname.comUSAdd domainDomain List → ManageAdvanced DNSAdd New RecordTXT RecordC.Do not copy the main domain.Mail Settings
Q: Will switching to Custom MX break my existing Gmail or Google Workspace email?
It can, if you're adding the MX records to your main domain and it's already used with Google Workspace. Re-add all 5 Google MX records alongside the Mailgun ones, and consider using a subdomain instead to avoid the risk entirely.
Q: What's the difference between the "Host" value for the TXT/MX records and the CNAME record?
For TXT and MX records, the host is just your subdomain (e.g. "mg"). For the CNAME record, Namecheap expects "email.mg" — the tracking subdomain Mailgun uses for click and open tracking.
Q: My records aren't showing a green checkmark after verifying — what should I do?
DNS changes can take time to propagate. Double-check each host and value against what Mailgun shows, then click Verify DNS Settings again after a few minutes.
Q: Why do I need two separate TXT records?
The first TXT record is your SPF record, which authorizes Mailgun to send on your behalf. The second, longer TXT record is your DKIM key, which cryptographically signs your outgoing mail.
Q: Do I need to copy the exact values shown in this guide, or the ones from my own Mailgun account?
Always copy the exact host and value strings shown in your own Mailgun dashboard — the mxa.mailgun.org and mxb.mailgun.org values are standard, but your TXT record values are unique to your domain.
Q: Can I use this same process for a domain provider other than Namecheap?
The record types and values are the same everywhere, but the interface for adding them differs by provider. Check the related provider-specific setup guides below.