Step-by-step Mailgun Setup - Namecheap Domain Setup
1. Sign up for Mailgun.com
2. Check your email inbox to verify the email address
3. Login to Mailgun, Click on Sending > Add New Domain
4. If your domain is companyname.com, you can either set up the main domain or subdomain with Mailgun.
A. Main domain:
- If you are adding the main domain, it should not be used with Gsuite, or any other email provider
Subdomain:
- To set up the subdomain with Mailgun, you can type ANYTHING_HERE.companyname.com
- Examples:
- mg.companyname.com
- replies.companyname.com
- support.companyname.com
- Examples:
B. Please set up the domain or subdomain under US, not EU. not EU. not EU.
C. Click on Add domain
5. Now log in to your DNS records based on where you get the domain and add the 5 DNS records.
Log in to Namecheap.com
Click on Domain List > Manage
Click on Advanced DNS, we are going to add 5 DNS records
To add the 1st TXT record
Click on Add New Record
Select TXT Record from the dropdown
A. Host:
Depending on the subdomain you are trying to set up, if you are trying to set up
mg.companyname.com The host name will be mg
replies.companyname.com The host name will be replies
If you are setting up a main domain like companyname.com, the host name will be @
B. Head back to Mailgun and Copy the first TXT record here v=spf1 include:mailgun.org ~all
Value: we will paste the first copied TXT record here v=spf1 include:mailgun.org ~all
C. Click on the green check
To add the 2nd TXT record
Click on Add New Record
Select TXT Record from the dropdown
A. Host:
it's a bit tricky but the key here is to copy everything from the beginning until the subdomain part, DO NOT copy the main domain
Examples: copy the highlighted part
Example 1 using subdomain | |
Example 2 using main domain: |
B. Value: we will paste the second long TXT record here
C. Click on the green check
To add the 1st MX records
Scroll down to MAIL SETTINGS
Switch the dropdown to Custom MX
This will affect your existing Gsuite account to capture incoming emails for the main domain if you have Gmail selected originally. Make sure you are using a subdomain for Mailgun. Check out Can I Use the Same Domain Name for Mailgun and for Google Apps (Or Another Email Server)?
You will need to add back 5 MX records for Google Gmail:
Host | Time to Live (TTL*) | Priority | Value |
---|---|---|---|
@ | 3600 | 1 | ASPMX.L.GOOGLE.COM |
@ | 3600 | 5 | ALT1.ASPMX.L.GOOGLE.COM |
@ | 3600 | 5 | ALT2.ASPMX.L.GOOGLE.COM |
@ | 3600 | 10 | ALT3.ASPMX.L.GOOGLE.COM |
@ | 3600 | 10 | ALT4.ASPMX.L.GOOGLE.COM |
Once you add back all FIVE MX records above, we can then add our MX records for Mailgun
Click on Add New Record
A. Host:
Depending on the subdomain you are trying to set up, if you are trying to set up
mg.companyname.com The host name will be mg
replies.companyname.com The host name will be replies
If you are setting up a main domain like companyname.com, the host name will be @
B. Value: paste the following data mxa.mailgun.org
C. Priority is 10
D. Click the green check
To add the 2nd MX records
A. Host:
Depending on the subdomain you are trying to set up, if you are trying to set up
mg.companyname.com The host name will be mg
replies.companyname.com The host name will be replies
If you are setting up a main domain like companyname.com, the host name will be @
B. Value: paste the following data mxb.mailgun.org
C. Priority is 10
D. Click the green check
To add the CNAME record
Scroll back up to the top section named HOST RECORDS
Click on Add New Record
Select CNAME Record from the dropdown
Head back to Mailgun to copy the host name, it's a bit tricky but the key here is to copy everything from the beginning until the subdomain part, DO NOT copy the main domain
Go back to Namecheap:
A. Host:
Depending on the subdomain you are trying to set up, if you are trying to set up
mg.companyname.com The host name will be email.mg
replies.companyname.com The host name will be email.replies
If you are setting up a main domain like companyname.com, the host name will be email
B. Value: paste the following data mailgun.org
C. Click the green check
Now that you have added 5 records, Go back to Mailgun and click on Verify DNS Settings
Click the same button to Verify DNS Settings again if some records are still not showing the green checkmark
Once you add all the DNS records and verify, you can grab the Mailgun API Key - Where to Find in Mailgun & Put in HighLevel
Then we could send a test email to see if everything works! Click here to learn How to send a test email in the Conversation