Fixing anymail/mailgun "Domain not found" error

Oct 03, 2019 · by Tim Kamanin

Are you swearing at mailgun now? Have you smashed your keyboard already? Do you keep receiving the Domain not found: error although you're 100% sure you've set everything up correctly?

Yeah, I've been there and probably, I have a solution for you.

Chances are, your domain is set as EU in mailgun. Make sure you use correct API base URL in this case:, note the eu part. Update example snippets that mailgun gave you with this endpoint and everything should start working just fine.

I'm on Django, and I use Anymail

Me too! Make sure you've added european mailgiun API URL to

    'MAILGUN_API_URL': '' # add this line!

That should be it; now you're happy european mailgun user! You're welcome!

Hey, if you've found this useful, please share the post to help other folks find it:

There's even more:

Subscribe for updates

  • via Twitter: @timonweb
  • old school RSS:
  • or evergreen email ↓ ↓ ↓