This guide walks you through creating a Mailgun account, adding a sending domain, choosing between a main domain and a subdomain, publishing the required DNS records, and confirming everything works with a test email.
Sign Up for Mailgun
Create your Mailgun account by visiting signup.mailgun.com/new/signup.
Verify Your Email Address
Check your email inbox for a message from Mailgun and click the verification link to confirm your account.


Add a New Sending Domain
From your Mailgun dashboard, click Sending → Add New Domain.

Choose a Main Domain or Subdomain
If your domain is companyname.com, you can set up either the main domain or a subdomain with Mailgun.
If you add the main domain, it should not already be in use with Google Workspace or any other email provider.
To set up a subdomain with Mailgun, you can type anything_here.companyname.com. Examples:
- mg.companyname.com
- replies.companyname.com
- support.companyname.com
Set up the domain or subdomain under the US region, not EU. Once you've made your selection, click Add domain.

Add Your DNS Records
Log in to your DNS host based on where you registered the domain, and add the 5 DNS records Mailgun provides.
Search your domain in MXToolbox. Only enter the domain itself — do not add "http://" in front of it.

Once you look up the domain, the results will show your DNS hosting provider.

MXToolbox will show a note at the bottom naming your host, e.g. "reported by wordpress.com." Once you know your provider, you can add the DNS records in that provider's dashboard. If you're not sure where to find the DNS records area, search "[provider name] DNS records."
Based on your domain provider, use one of these step-by-step guides to add the records. If your provider isn't listed, one of these should still be a close match:
Get Your API Key & Send a Test Email
Once all of your DNS records are added and verified, grab your key from Mailgun API Key: Where to Find It in Mailgun and Add It to the Platform.
Send a test email to confirm everything works. See How to Send a Test Email in the Conversation for the steps.
Frequently Asked Questions
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article