We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

Domain Verification Setup Guide

Article Preview

    Overview

    Our aim with this step-by-step guide will walk you through how to add and verify a domain in Mailgun. 

    Verifying your domain is an essential step to start sending email through Mailgun. We ask all of our users to verify ownership to enable open and click tracking, mitigate spam, and ensure that nobody can send from your domain besides you and your organization.

    If your domain is already hosted somewhere, you’ll need to login to your provider to change DNS records. If your domain isn’t hosted anywhere yet, you can setup an account at a provider like Cloudflare, Google Domains, GoDaddy, or Namecheap. 

    Pro-Tip: We have guides specifically crafted for some of the most popular DNS hosting providers below in Step 2.

     

    Step 1: Add your domain to Mailgun

    If you’ve already added your domain, skip to step 2.

    Prefer videos? This video walkthrough demonstrates adding a domain to Mailgun's system and configuring that domain's DNS records within a DNS hosting provider.

    Before you can verify a domain, it needs to be added to Mailgun. We'll guide you using the steps below:

    1. First, log in to the Mailgun Control Panel (if you have not already done so)
    2. Then, within the left-hand navigation pane, click the Sending option to expand its list of suboptions. 
    3. Next, click the Domains suboption. 
      Screen Shot 2022-09-11 at 6.29.54 PM.png
    4. To add a domain, click the Add New Domain button.
      Screen Shot 2022-09-11 at 6.34.31 PM.png
    5. Fill in the required information and click the Add Domain button.
      Screen Shot 2022-09-11 at 6.34.45 PM.png

    As for choosing a domain, we recommend using a subdomain for better email deliverability. In this example, we used mail.yourdomain.com. If you want to use just your domain name, that’s (usually) fine too. 

    The next screen that you're taken to will ask you to add DNS records to your domain. Leave this screen open for the next step.

    SEND.AddDomain.VerifyNewDomain.png

     

    Step 2: Add DNS records to hosting provider

    Use one of the available guides if your DNS provider is listed below.

    Next, you’ll be asked what type of DNS records you want to add. We’ll go through each one individually below so that you have a general idea of how to add these to your DNS hosting provider. Please note, the below are examples using just one DNS provider; as such, there will be some differences for how you will enter your DNS records into your DNS host. 

     

    TXT records

    The first records Mailgun asks you to add are TXT records. We will add two separate TXT records, one for SPF and one for DKIM. These are required to send and receive email with Mailgun. 

    Note:
    If you already have an existing SPF record for this root domain, you cannot add another SPF record.

    Instead, you will insert the value include:mailgun.org into your existing SPF record. Ensure this value is placed somewhere after v=spf1 and somewhere before ~all. Also, ensure this value has one space character to its left and one space character to its right.

    For example, v=spf1 include:domain1.com include:mailgun.org include:domain3.com ~all


    Screen_Shot_2019-07-18_at_1.53.04_PM.png

    If you’re using a subdomain, add a new TXT record with mail.yourdomain.com as the hostname (with certain providers, you may just have to enter the subdomain, which would just be mail in this case) and the appropriate value Mailgun provides. You can leave TTL as the default option.

    Group_6.png

    If you’re not using a subdomain, most providers will accept @ as the hostname when creating DNS records for the root domain. Here’s an example:

    Screen_Shot_2019-07-18_at_11.30.27_AM.png

    Clicking Add Record will add your first DNS entry for your domain!

    Screen_Shot_2019-07-01_at_9.59.45_AM.png

    Add another TXT record for mx._domainkey.mail.yourdomain.com. Cloudflare only shows the subdomain, so your result will look like this: 


    Screen_Shot_2019-07-01_at_10.35.50_AM.png

     

    MX records

    Next, you need to add MX records. Mailgun requires you to add two separate MX records.

    Screen_Shot_2019-07-18_at_1.53.13_PM.png

    You will add the MX records the same way you did with the TXT records. The hostname in this case is mail.yourdomain.com You’ll also be asked for priority, which should be 10.

    Screen_Shot_2019-07-01_at_10.38.35_AM.png

    CNAME record

    Lastly, you will need to add a CNAME record. The CNAME Record is what enables Open and Click tracking. This is highly recommended to reap the full benefit of Mailgun and gain insights into your email performance.

    Screen_Shot_2019-07-18_at_1.53.18_PM.png

    Add the CNAME the same way as the others. The hostname here is email.mail.yourdomain.com

    Screen_Shot_2019-07-01_at_10.40.47_AM.png

    Step 3: Wait (up to 24-48 hours)

    It can take up to 24 to 48 hours for DNS changes to propagate across the internet. In our experience, it usually happens faster than that, but don’t get discouraged if it doesn’t happen immediately. If everything is setup right you’ll receive an email from Mailgun like this:

    Group_9.png

    If you’re impatient like us, you can also use the ‘Check DNS Records Now’ button on the DNS Settings page.

    Group_8.png

    For additional troubleshooting scenarios and tips should you need them, please refer to this article.

     

    Need Support?

    Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!