If you’re getting the error “This domain name is already taken” on Mailgun, even after removing all DNS records, it means the domain still exists in another Mailgun account. Deleting DNS records doesn’t release the domain — Mailgun stores ownership internally.
You don’t need access to the old account. Here’s the exact fix (Mailgun support confirmed this):
Verify domain ownership with a temporary CNAME
Contact Mailgun support and tell them:
“I own the domain. Please give me a verification CNAME so you can release it from the old account.”
They will reply with email something like:
CNAME Host: verify1234.yourdomain.com
Points To: mailgun.org
Add this CNAME in your DNS (GoDaddy/cPanel/Cloudflare etc.):
Host/Name → verify1234
Value → mailgun.org
Wait until it resolves on MXToolbox or DNSChecker. Reply to Mailgun support saying:
“The verification CNAME is live.”
Mailgun will then remove your domain from the previous account and you can add it to your new account. Remove the temporary CNAME once Mailgun tells you the domain is released.
If you're on the free Mailgun plan, you’re allowed only one domain. Root domain + subdomains are counted separately, so choose wisely. This method works even if you changed hosting, lost access to the old developer, or the domain was abandoned on an old Mailgun account.
I've run into this several times while helping clients migrate domains at CodeGuardHost.com. The CNAME verification method is the official Mailgun fix. If you want fully managed DNS + Mailgun/SMS/email setup, you can check the site, otherwise this guide will solve it.