Changing MX Records for External Mail (Google Workspace/Microsoft 365)
Explains how to change your domain's MX records in DirectAdmin to route email through Google Workspace or Microsoft 365.
Want your email to run through an external provider such as Google Workspace or Microsoft 365, instead of our own mail server? Then you need to adjust your domain's MX records. In this article, we explain how this works.
Note: As soon as you change the MX records, our own email server will no longer work for this domain. Make sure your external mail environment (Google Workspace/Microsoft 365) is fully set up before making this change, otherwise you risk temporarily not being able to receive email.
Step 1. Gather the correct MX records
You can find the exact MX records you need in your mail provider's admin panel:
- Google Workspace: found when setting up your domain in the Google Admin Console, under Set up MX records.
- Microsoft 365: found in the Microsoft 365 Admin Center, under Domains → DNS settings.
Step 2. Adjust the MX records in DirectAdmin
- Log in to DirectAdmin via
yourwebsite.com:2222. - Navigate to DNS Management.
- Choose the correct domain.
- Remove the existing MX record(s), or adjust them.
- Add the new MX record(s) provided by your mail provider, including the correct priority.
- Click Save.
Step 3. Check SPF, DKIM, and DMARC
Also add the SPF, DKIM, and DMARC records your mail provider specifies. This prevents your emails from being marked as spam.
Troubleshooting
- Email no longer arrives anywhere: check whether the MX records exactly match what your mail provider specifies, and whether you haven't accidentally left old MX records in place.
- Change doesn't seem active: DNS changes can take up to a few hours to propagate globally.
- Emails end up in spam: check whether SPF, DKIM, and DMARC are set up correctly.
Still stuck? Feel free to reach out via Discord or create a support ticket.
