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

# Custom Domains

> Add your own domain to send outbound email and receive inbound mail on AgentPost mailboxes.

Custom domains let you create mailboxes under an address you control — for example, `support@yourdomain.com` — and use them to send outbound email via AgentPost and optionally receive inbound mail. Adding a domain takes a few minutes of DNS configuration.

## Adding a domain

Navigate to **Settings → Domains** and click **Add Domain**. Enter your domain name (e.g., `yourdomain.com`) and confirm. AgentPost registers the domain and generates the DNS records you need to configure.

<Note>
  Public email provider domains (Gmail, Outlook, etc.) and AgentPost's own domains cannot be registered as custom domains.
</Note>

## Configuring DNS records

After adding your domain, AgentPost shows you the DNS records to add at your DNS provider. You must add all three record types before verification will pass.

| Record type | Purpose                                                                       | Required |
| ----------- | ----------------------------------------------------------------------------- | -------- |
| **DKIM**    | Cryptographically signs outbound messages so receiving servers trust them     | Yes      |
| **SPF**     | Authorizes AgentPost's sending infrastructure to send on your domain's behalf | Yes      |
| **DMARC**   | Tells receiving servers what to do with messages that fail DKIM or SPF checks | Yes      |

Copy each record exactly as shown in the dashboard and add it at your DNS registrar or nameserver provider. DNS changes can take up to 48 hours to propagate, though they often take effect within minutes.

Once your records are in place, click **Verify DNS** in the dashboard. AgentPost checks each record and shows the result. When all checks pass, the domain moves to the next status.

## Domain status lifecycle

Your domain progresses through the following statuses:

| Status           | Meaning                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------ |
| `pending_dns`    | DNS records have not yet been verified. The domain cannot send or receive mail.            |
| `pending_warmup` | DNS is verified. The domain is in a 72-hour warmup period with a reduced daily send limit. |
| `active`         | Warmup is complete. The domain is fully operational with standard send limits.             |
| `suspended`      | The domain has been suspended due to a high bounce rate. Sending is blocked.               |

<Warning>
  During the warmup period (default 72 hours), your domain is limited to **10 outbound emails per day**. After warmup completes and the domain reaches `active` status, the standard limit of **50 emails per day** applies. If your bounce rate exceeds 10% (with at least 5 delivery events tracked), the domain is automatically suspended.
</Warning>

## Enabling inbound email

To receive email on your custom domain, you need to complete two additional steps:

<Steps>
  <Step title="Add an MX record">
    At your DNS provider, add an MX record pointing your domain to the AgentPost mail server:

    ```
    MX  yourdomain.com  10  agent.agentpost.email
    ```

    Once the record is live, click **Verify MX** in the domain settings page to confirm AgentPost can see it.
  </Step>

  <Step title="Enable inbound routing">
    In domain settings, toggle **Receive email** on. This tells AgentPost to accept and deliver inbound mail for your domain. The change takes effect immediately — no additional configuration needed.
  </Step>
</Steps>

<Info>
  Only mailboxes that exist on the domain receive messages. Email sent to a local part that does not match an existing mailbox is silently discarded — no bounce is generated.
</Info>

Once inbound is enabled, any mailbox you create under this domain (e.g., `support@yourdomain.com`) will receive mail sent to that address. The `mx_verified` field on mailboxes indicates whether the domain's MX records have been verified for inbound email.

<Note>
  MX verification and the `receives_email` toggle are managed exclusively through the web UI. These settings cannot be changed via the MCP API.
</Note>

## Removing a domain

Go to **Settings → Domains**, open the domain menu, and select **Remove**. This deletes the domain from AgentPost. Any mailboxes created on the domain remain in your account but can no longer send or receive mail.
