Mailgun US vs EU region: endpoints, and the errors you get on the wrong one
Each Mailgun domain lives in one region, chosen when you add it, and every API call for it must go to that region's host: https://api.mailgun.net for US domains, https://api.eu.mailgun.net for EU domains (and https://api.au.mailgun.net for AU, contract only). API keys are global for US and EU, so the wrong host doesn't reject your key. It behaves as if the domain doesn't exist, typically a 404 with "Domain not found". A domain's region can't be changed; you recreate it in the other region.
Endpoints by region
| Service | US | EU | AU (contract only) |
|---|---|---|---|
| REST API | api.mailgun.net | api.eu.mailgun.net | api.au.mailgun.net |
| Outgoing SMTP | smtp.mailgun.org | smtp.eu.mailgun.org | smtp.au.mailgun.org |
| Inbound MX | mxa.mailgun.org, mxb.mailgun.org | mxa.eu.mailgun.org, mxb.eu.mailgun.org | mxa.au.mailgun.org, mxb.au.mailgun.org |
| Open/click tracking CNAME | mailgun.org | eu.mailgun.org | au.mailgun.org |
| Control panel | app.mailgun.com | app.eu.mailgun.com |
The paths are the same in every region; only the host changes. Switching a client to the EU means changing https://api.mailgun.net/v3/mg.example.com/messages to https://api.eu.mailgun.net/v3/mg.example.com/messages, and the SMTP host to match.

What is global and what stays in one region
| Global (one account) | Region-bound (US / EU / AU) |
|---|---|
| Account metadata, users, billing, API keys (except AU) | Sending domains and their SMTP credentials, messages (MIME), event logs, metrics, suppressions, mailing lists, tags, routes, IP addresses |
Mailgun says message data never leaves the region in which it is processed. That is why a domain can't simply be moved: its logs, suppressions and stored messages stay where they are.
Symptoms of calling the wrong region
| What you see | What it means |
|---|---|
404 with {"message": "Domain not found"} from /v4/domains/mg.example.com or another domain endpoint | That host has no such domain. Check its region (or the spelling, such as example.com instead of mg.example.com). |
GET /v4/domains lists some of your domains but not others | Each host only lists its own region's domains. Query both. |
| Logs, metrics or suppressions come back without the domain's data | That data lives on the other region's host. |
401 with Invalid private key (or Forbidden on sending) | Not a US/EU region problem: the key is wrong, deleted or lacks access. Keys work in both US and EU; AU keys are the exception. |
Find a domain's region
The quickest check is to ask both hosts. The domain appears on exactly one of them, because a domain name is unique across Mailgun and can't exist in both regions.
curl -s --user "api:$MAILGUN_API_KEY" \
https://api.mailgun.net/v4/domains/mg.example.com
curl -s --user "api:$MAILGUN_API_KEY" \
https://api.eu.mailgun.net/v4/domains/mg.example.comThe one that answers 200 with the domain's details is its region. In the control panel, the region is shown when you open the domain, and EU accounts sign in at app.eu.mailgun.com.
Moving a domain to the other region
Mailgun can't change a domain's region after it is created; its help centre gives possible GDPR implications as the reason. AU, for completeness, is available on contract only and for Mailgun Send only. To move between US and EU you have two options:
- Add a new subdomain in the target region (for example
eu.mg.example.com) and move sending over gradually. Nothing is deleted, so there is no gap. - Delete the domain and add it again in the other region. Deleted data can't be recovered, so first export suppressions (Bounces, Complaints, Unsubscribes each have an Export button) and mailing lists, and note your Routes, webhooks and SMTP credentials, which you recreate by hand.
Either way you publish the new region's DNS records (EU MX and tracking values differ; see Mailgun domain verification), and point your code at the new API and SMTP hosts. Dedicated IPs are region-bound too: an EU domain needs an EU dedicated IP.
Questions
Does a Mailgun API key work in both the US and EU regions?
Yes. API keys are global across US and EU, so one key can manage domains in both. AU is the exception.
Can the same domain exist in both regions?
No. Domain names are unique across Mailgun, so the same domain can only be in one region at a time.
Can I switch a Mailgun domain from US to EU?
Not in place. Either add a new subdomain in the EU region or delete the domain and recreate it there, exporting suppressions and lists first.
Where is EU Mailgun data stored?
Message data stays in the region where it is processed. Only account-level data such as users, billing and API keys is replicated globally.
Related
- Mailgun domain not verified: DNS records to checkMailgun verifies a domain from SPF and DKIM TXT records; MX and the tracking CNAME serve receiving and tracking. Values, DNS mistakes and re-checking.
- Mailgun suppressions: bounces, complaints, unsubscribesMailgun drops mail to addresses on a domain's bounces, complaints or unsubscribes list. How to find why an address is there and remove it safely.
- Mailgun failed events: permanent vs temporary failuresA Mailgun failed event has severity permanent (dropped, not retried) or temporary (retried for up to 8 hours). How to read reason and delivery-status.
- Bouncewise Mailgun API key: which key to useUse a Mailgun account API key (Admin or Support role), not a domain sending key. Bouncewise finds your US and EU domains with one key.