Overview
While there is no in-app feature for moving/transferring a domain from one Mailgun account to another Mailgun account, it is possible to do so by deleting the domain from its original Mailgun account and then adding the domain to its new Mailgun account.
However, there are various implications to consider carefully before making the decision to move a domain.
Understanding the context
Setting the scene
Domains within the Mailgun environment must be unique; in other words, each domain can only exist on one account at a time. As such, attempting to add an existing domain to another account will result in a failure.
So, how can a domain be moved from one account to another? Mailgun doesn't have a built-in feature or mechanism that facilitates the transfer of domains between accounts. Rather, the only way to move a domain from one account to another is to delete the domain from its current account and then to add the domain to its new account.
Discerning the nuance
There are a number of effects - namely the elimination of all existing data for the domain - that will occur when performing this transfer:
- All stats and analytics, logs containing the events and metadata of your messages, and message MIMEs (message content) within the account's retention period will be deleted.
- The DKIM record, SMTP password, API key, and Domain Sending Keys will have different values once the domain is added to the new account.
- Any mailing lists, routes, templates, and webhooks configured for the domain will need to be either imported or recreated in the new account.
Implementing the solution
Transferring the domain
This article goes over the steps needed to delete the domain from the previous account and add the domain to the new account.
Transferring everything else?
It is possible to manually transfer some of the features/data types to the new account. However, much of this must occur before deleting the domain. Additionally, performing many of the below actions require API knowledge and experience.
- Stats and analytics can be exported using the Stats API and Tags API.
- Logs can be exported using the Events API.
- Message MIMEs (message content) within your account's storage retention period can be retrieved using the Messages API.
- The DKIM record will have changes to two values specifically: the selector field and the value field, both of which will be found in the Mailgun Control Panel after adding the domain to the new account. These values will need to be updated in your DKIM record, which means that you will need to login to your DNS provider's system and update the record.
- As for the SMTP password, the new credential will be found in the Mailgun Control Panel after adding the domain to the new account. Any applications that connect to Mailgun via the domain's SMTP credentials will need to be updated to use the latest credentials.
- As for the API key, the new key will be found in the Mailgun Control Panel after adding the domain to the new account. Any applications that connect to Mailgun via the previous account's API key will need to be updated to use the latest key.
- As for any Domain Sending Keys, new ones will need to be created in the Mailgun Control Panel after adding the domain to the new account.
- Mailing Lists individually can be exported using the export button within the Mailing List page in the Mailgun Control Panel and then imported into the new account through the import button within the Mailing List page in the Mailgun Control Panel. Also, the Mailing List API can be used to perform the same task.
- Routes can be exported using the Routes API and then imported into the new account through the Routes API as well.
- Templates can be exported using the Templates API and then imported into the new account through the Templates API as well.
- Webhooks can be exported using the Webhooks API and then imported into the new account through the Webhooks API as well.
Need Support?
Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!