How do I avoid MX record conflicts?
If you already use Gmail, Outlook, or another email provider for your domain, adding AgentMail’s MX records could conflict with your existing setup. Here is how to avoid that.
Use a subdomain
The simplest and recommended approach: set up AgentMail on a subdomain instead of your root domain.
Your agents send and receive from addresses like support@agents.yourcompany.com, while your team keeps using name@yourcompany.com. Both work independently with no overlap.
How to set it up
When adding your domain in AgentMail, use the subdomain:
Then add the records AgentMail returns for agents.yourcompany.com at your DNS provider: the receiving MX, the MAIL FROM MX and SPF on mail.agents.yourcompany.com, DKIM, and DMARC. All of them sit on agents.yourcompany.com or names below it, so they are completely separate from your root domain’s records and will not affect your existing email.
Hosting inboxes on many subdomains
The setup above puts all your agents on one subdomain. If you instead want inboxes spread across many subdomains (for example, one per team or customer), enable subdomains on the domain you registered. With them enabled on agents.yourcompany.com, publishing a single wildcard MX record (*.agents.yourcompany.com) lets you create inboxes on any nested subdomain, such as support@team1.agents.yourcompany.com, without registering each one. Your root domain’s email is never touched.
Can I use my root domain?
Yes. Pick the option that matches how you want mail to flow:
Sending only (no receiving): Create the domain with inbound_enabled set to false. AgentMail then leaves the receiving MX out of the records it returns, and registration skips the existing-provider check. You still add the MAIL FROM MX and SPF records on mail.yourcompany.com, plus the DKIM and DMARC TXT records. None of these change your root domain’s MX records or its existing SPF record, so your Gmail or Outlook inbound mail is unaffected.
If _dmarc.yourcompany.com already has a DMARC record, keep that single record instead of adding a second one, and make sure it includes a rua=mailto: reporting address.
Sending and receiving alongside Google Workspace: Google stays the preferred mail server for your domain and a Google Workspace routing rule passes mail for unrecognized addresses to AgentMail. Register the domain with allow_conflicting_provider set to true and follow the Google Workspace guide. Without that flag, registering a domain whose MX records point to Google Workspace or Microsoft 365 returns a 422 error.
AgentMail handles all inbound mail: Replace your existing MX records with AgentMail’s receiving MX. All incoming mail for the domain then routes to AgentMail instead of Gmail or Outlook. Only do this if you want AgentMail to handle all inbound email for that domain.
Example DNS setup
Before (Gmail only):
After (Gmail on root + AgentMail on subdomain):
These are the values for a US-region domain. Copy the exact names and values AgentMail returns for your domain; see the full record set for what each record does.
Legacy orgs should keep existing working DNS records in place. For new domain setup, add the TXT selector records shown in AgentMail.
Your team’s email continues to flow through Gmail. Agent emails go through AgentMail. Clean separation with no conflicts.
Common subdomain choices
Pick whatever makes sense for your brand. The important thing is that it is a separate subdomain from your root domain’s email. Avoid mail.yourcompany.com if you also register your root domain with AgentMail: that hostname is your root domain’s MAIL FROM subdomain, and its only MX record must be AgentMail’s bounce record.
