> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Avoiding MX Record Conflicts

> Learn how to avoid conflicts with your existing MX records when setting up a sending domain

## What is an MX Record?

MX (Mail Exchanger) records specify where incoming mail should be delivered for a domain. Every MX record has a priority value—the lower the number, the higher the priority.

Migma requires you to set up an MX record on `send.[sending-domain]` to establish a return-path for bounce and complaint reports from inbox providers. If your sending domain is `mail.yourdomain.com`, the MAIL FROM hostname is `send.mail.yourdomain.com`.

***

## Won't This Conflict with My Existing Email Provider?

**No, it won't.** Here's why:

### How MX Records Work

MX records only affect the specific subdomain (or domain) they're associated with. They don't impact other subdomains or the root domain.

### Example: You Use Google Workspace

Say you're using Google Workspace for your email. You'll have MX records that look like this:

```
yourdomain.com     MX    10    alt3.aspmx.l.google.com.
yourdomain.com     MX    20    alt4.aspmx.l.google.com.
```

These records specify that incoming mail to `anything@yourdomain.com` should be delivered to Google's servers.

### Adding Migma's MX Record

When you add a sending domain to Migma, you need to add an MX record for `send.[sending-domain]`:

```
send.yourdomain.com          MX    10    [Migma-provided value]
send.mail.yourdomain.com     MX    10    [Migma-provided value]
```

**This won't conflict** because:

* The Migma MX record is for the `send` hostname under your sending domain
* Your Google MX records are for your inbox domain
* These are separate hostnames

| Emails sent to...                   | Delivered to...             |
| ----------------------------------- | --------------------------- |
| `hello@yourdomain.com`              | Google Workspace            |
| `support@yourdomain.com`            | Google Workspace            |
| `anything@send.yourdomain.com`      | Migma (for bounce handling) |
| `anything@send.mail.yourdomain.com` | Migma (for bounce handling) |

Your existing email flow is unaffected.

***

## Why Migma Uses the `send` Subdomain

Migma specifically uses the `send` subdomain for the MAIL FROM (return-path) because:

1. **No conflicts** - It doesn't interfere with your existing MX records
2. **Better deliverability** - Bounce handling is properly configured
3. **Separation of concerns** - Sending infrastructure is isolated from receiving

***

## Common MX Record Conflicts

<AccordionGroup>
  <Accordion title="Existing record on `send` subdomain" icon="triangle-exclamation">
    **Problem:** You already have an MX record for `send.[sending-domain]` from another service.

    **Solutions:**

    1. **Remove the existing record** if you no longer use that service

    2. **Use a different subdomain** in Migma (contact support for custom MAIL FROM subdomain configuration)
  </Accordion>

  <Accordion title="Same priority value (10) already in use" icon="list-ol">
    **Problem:** You have another MX record with priority 10 for the same subdomain.

    **Solution:** Each MX record should have a unique priority. Either:

    * Change Migma's priority to a different number (e.g., 5)
    * Update your existing record to a different priority

    <Note>
      If two MX records have the same priority, mail servers will randomly choose one per delivery attempt—they won't deliver to both.
    </Note>
  </Accordion>

  <Accordion title="DNS provider auto-appending domain name" icon="text-slash">
    **Problem:** Your MX record appears as:

    ```
    feedback-smtp.us-east-1.amazonses.com.yourdomain.com
    ```

    Instead of:

    ```
    feedback-smtp.us-east-1.amazonses.com
    ```

    **Solution:** Add a trailing period (dot) at the end of the MX value:

    ```
    feedback-smtp.us-east-1.amazonses.com.
    ```

    The trailing period tells your DNS provider this is a fully qualified domain name that should not be modified.
  </Accordion>
</AccordionGroup>

***

## Checking Your MX Records

### Using a Web Tool

Use [MXToolbox](https://mxtoolbox.com/SuperTool.aspx) or [DNS Checker](https://dnschecker.org) to verify your MX records:

1. Enter `send.[sending-domain]`, such as `send.mail.yourdomain.com`
2. Select "MX Lookup"
3. Verify the record matches what Migma provided

### Using the Terminal

```bash theme={null}
# Check MX record for your MAIL FROM hostname
nslookup -type=MX send.mail.yourdomain.com

# Or using dig
dig MX send.mail.yourdomain.com
```

You should see the value Migma provided with priority 10.

***

## Summary

| Your existing MX records                    | Migma's MX record                   | Conflict?                   |
| ------------------------------------------- | ----------------------------------- | --------------------------- |
| `yourdomain.com` -> Google                  | `send.yourdomain.com` -> Migma      | No                          |
| `yourdomain.com` -> Microsoft 365           | `send.mail.yourdomain.com` -> Migma | No                          |
| `mail.yourdomain.com` -> Your server        | `send.mail.yourdomain.com` -> Migma | No                          |
| `send.mail.yourdomain.com` -> Other service | `send.mail.yourdomain.com` -> Migma | **Yes** (remove old record) |

The only conflict occurs when you already have something on the exact same full MAIL FROM hostname, such as `send.mail.yourdomain.com`.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Domain Verification Issues" icon="circle-question" href="/sending-domains/verification-issues">
    Troubleshoot verification problems
  </Card>

  <Card title="Add Sending Domain" icon="globe" href="/sending-domains/add-domain">
    Complete domain setup guide
  </Card>
</CardGroup>
