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

# MX Records

> Learn what MX records are and how they enable bounce and complaint handling.

## What are MX records?

MX (Mail Exchange) records are DNS records that tell the internet where to deliver emails for a domain. When someone sends an email to `hello@acme.com`, the sending server looks up the MX records for `acme.com` to find out which mail server should receive the email.

MX records are the postal address of the email world — they direct mail to the right destination.

## How MX records work

<Steps>
  <Step title="Email sent to hello@acme.com">
    The sending server needs to find out where to deliver the email.
  </Step>

  <Step title="DNS lookup">
    The server looks up MX records for `acme.com` and finds `mail.acme.com` with priority 10.
  </Step>

  <Step title="Delivery">
    The server connects to `mail.acme.com` and delivers the email.
  </Step>
</Steps>

An MX record has two parts:

| Part            | Description                     | Example         |
| --------------- | ------------------------------- | --------------- |
| **Mail server** | The hostname that handles email | `mail.acme.com` |
| **Priority**    | Lower number = higher priority  | `10`            |

## Priority and failover

You can have multiple MX records with different priorities. The sending server tries the lowest number first:

| Priority | Mail server      | Role                                     |
| -------- | ---------------- | ---------------------------------------- |
| 10       | `mail1.acme.com` | Primary — tried first                    |
| 20       | `mail2.acme.com` | Backup — tried if primary is unavailable |

If the primary server is down, the sending server automatically tries the next one. This gives you redundancy.

## MX records and SendKit

When you add a domain in SendKit, we generate an MX record for the `send` subdomain:

| Field        | Value                               |
| ------------ | ----------------------------------- |
| **Type**     | MX                                  |
| **Name**     | `send.yourdomain.com`               |
| **Value**    | Provided on your domain detail page |
| **Priority** | 10                                  |
| **TTL**      | 3600                                |

### Why does SendKit need an MX record?

SendKit uses the MX record on the `send` subdomain for two critical purposes:

**1. Bounce handling**

When an email can't be delivered (invalid address, full mailbox, etc.), the recipient's mail server sends a bounce notification back. The MX record tells it where to send that notification — back to SendKit, so we can:

* Mark the email as bounced in your dashboard
* Trigger the `email.bounced` webhook
* Track your bounce rate

**2. Complaint handling**

When a recipient marks your email as spam, their email provider sends a complaint notification (via feedback loops). The MX record ensures these complaints reach SendKit so we can:

* Mark the contact as complained
* Add them to the suppression list
* Trigger the `email.complained` webhook

Without the MX record, you'd be sending emails blind — with no visibility into bounces or complaints.

<Note>
  The MX record is on the `send` subdomain only. It does not affect your root domain's email delivery. Your regular email (Google Workspace, Outlook, etc.) is not impacted.
</Note>

## MX records vs other DNS records

| Record    | Purpose in email                                                    |
| --------- | ------------------------------------------------------------------- |
| **MX**    | Directs where to deliver email (and bounce/complaint notifications) |
| **SPF**   | Declares who can send email for the domain                          |
| **DKIM**  | Signs emails to prove authenticity                                  |
| **DMARC** | Defines policy for failed authentication                            |

MX handles **inbound** email routing. SPF, DKIM, and DMARC handle **outbound** email authentication.

## Common MX issues

| Problem                | Cause                                     | Fix                                                                     |
| ---------------------- | ----------------------------------------- | ----------------------------------------------------------------------- |
| Bounces not tracked    | MX record missing or incorrect            | Add the MX record from your SendKit domain detail page                  |
| MX record not found    | Wrong subdomain name                      | Make sure it's on `send.yourdomain.com`, not your root domain           |
| Conflicting MX records | Multiple MX records on the same subdomain | Remove any MX records on `send.yourdomain.com` that aren't from SendKit |

## FAQ

<AccordionGroup>
  <Accordion title="Will the MX record affect my regular email?">
    No. The MX record is on the `send` subdomain (e.g., `send.acme.com`), not your root domain. Your existing email delivery through Google Workspace, Outlook, or any other provider is completely unaffected.
  </Accordion>

  <Accordion title="What if I already have MX records on my domain?">
    That's fine — SendKit's MX record is on the `send` subdomain, which is separate from your root domain's MX records. They don't conflict.
  </Accordion>

  <Accordion title="Do I need the MX record for verification?">
    Yes. The MX record is one of the three required DNS records for domain verification in SendKit (along with SPF and DKIM).
  </Accordion>
</AccordionGroup>
