Verifying Your Domain with Mailgun on DigitalOcean

Ghost's instructions for configuring email on a self-hosted version were pretty vague.

If you are encountering issues verifying your domain & DNS records, Mailgun points you to this setup for DigitalOcean. It was extremely helpful and prevented me from having a complete meltdown. (As well as this post.)

However, I was still having issues with my TXT records. Of the two, one would return verified and the other not. I experimented with switching the values between the two records on DigitalOcean. Immediately, the other TXT record was verified, but now the first wasn't recognized.

This led me to determine it was an issue with the hostname. The fix for me was to have one TXT record's hostname be "@" instead of "" and to remove "" from the other hostname, leaving it only "smtp._domainkey".

  • Place values within "quotes" on DigitalOcean
  • Use "@" instead of "" for the first hostname
  • Remove "" from the second hostname leaving only "smtp._domainkey"

Good luck and hope this helps someone else out!