Setup Mailgun with cPanel and Google Apps

WordPress and Mailgun – Making the Records Verify

If you are here you already know why we are using Mailgun with WordPress, so we’ll skip that.

Mailgun DNS Records Won’t Verify!

I tried a number of solutions to get mailgun to verify my DNS records and it was a nightmare guessing game. That being said, I figured it out.

A quick note on SPF records before we continue:

SPF Records and Subdomains vs. Single Domain

You cannot have two SPF records for a single domain, meaning that this below is not allowed: txt  "v=spf1 ~all" txt  "v=spf1"

However, you can combine the records into one record: txt spf "v=spf1 ~all:

But know that subdomains can have their own SPF records so that this below is allowed: txt  "v=spf1 ~all" txt txt  "v=spf1 ~all"

Here’s what you have to do to make it work (assuming you are using with Mailgun):

  1. create the new subdomain in cPanel (or in whatever manner you use to create subdomains)
  2. mailgun is then going to tell you that you need to add an SPF record for:  The problem is that (at least in WHM’s edit dns feature) — you need to leave out the trailing “”
  3. Your SPF Record for Mailgun should look like this:

    mg txt "v=spf1"

    and NOT txt "v=spf1"
  4. The same thing now applies for the DKIM. Mailgun will tell you to use:

    but what you need to use is this:

Once I realized the error I was making and made these changes, my domain verified instantly.

Hope this helps!

| More

SpiderOak Online Backup, Storage, Access, Sync, and Sharing

We are currently offering a free copy of our 16-page eBook, "How to Organize your Digital Photography Collection" to everyone who signs up for our free newsletter. This eBook will review how to organize your digital photos, discuss metadata, and give you an overview of software than can help you with your digital photography workflow. Sign up in the signup area, located in the right-side column of every page on this site, and read your copy now!