Opens in a new tab

include:mailgun.org — Mailgun’s SPF include, and where it goes

include:mailgun.org authorises Mailgun’s servers. It belongs on the domain you verified in Mailgun, because that domain is the envelope sender of your Mailgun mail — and Mailgun recommends a subdomain such as mg.yourdomain.com. It is also one of the dearer includes: mailgun.org includes further records of its own, for its US and EU servers.

v=spf1 include:mailgun.org ~all
Belongs toMailgun Send — Email API and SMTP
Needed on your domain?It depends on how you use it — see below
Goes onThe domain you verified in Mailgun — often a subdomain

What it costs, and is it in your record?

We measure include:mailgun.org as the page opens. Enter a domain: we read its SPF record, follow every include and say whether Mailgun’s is there and what it costs.

What it covers

Mail sent through Mailgun’s API and SMTP for the sending domain you verified.

Do you need it?

Yes — on the domain you send from in Mailgun. That domain is the envelope sender (Mailgun’s DMARC article gives “a mail-from of mg.domain.com” as its example), so SPF checks its record, and Mailgun marks the TXT record as required to send.

If you verified a subdomain, the include goes on that subdomain’s own SPF record (“add a new TXT record with mail.yourdomain.com as the hostname”), and your root record does not need it at all. It belongs on the root only if the root itself is your Mailgun sending domain.

Its other forms

IncludeFor
eu.mailgun.orgMailgun’s EU servers alone. Mailgun’s documentation gives only mailgun.org, which already includes the EU servers.

Common mistakes

  • Two SPF records on the same name — merge them into one.
  • A CNAME on the same name as the TXT record: “the CNAME will take precedence”.
  • A DNS panel that appends the domain, giving mail.example.com.example.com.
  • Sending from the root domain through a subdomain’s set-up when DMARC has aspf=s.

Setting up Mailgun: SPF, DKIM and DMARC together →

Questions

Why does include:mailgun.org cost more than one lookup?

Because mailgun.org’s record includes others — one for its US servers, which in turn includes two more, and one for its EU servers. Each counts against the 10-lookup limit of whatever record includes it. The check above measures it now.

Does Mailgun accept a flattened record?

Yes: Mailgun says mailgun.org does not need to appear in the record for the domain to verify, as long as the record lists Mailgun’s addresses.

Sources

Checked on 26 September 2026 against these official sources:

Stay under 10 lookups without dropping a sender

Let us host your SPF record: you publish one include line, we flatten every service in it to their addresses and refresh it hourly, so however many there are they fit in a few lookups — and we tell you when a service changes its addresses. On the Personal plan and up.

Create a free account