How do I set up a custom domain?
Send emails from your own domain instead of @agentmail.to.
Custom domains let your agent send emails from your brand (e.g., agent@yourcompany.com) instead of the default @agentmail.to. This improves deliverability and builds trust with recipients.
Custom domains are available on the Developer plan and above. The free tier uses @agentmail.to only. See the pricing page for details.
Steps
- Add your domain in the AgentMail Console or via the API
- Add the DNS records AgentMail provides to your DNS provider
- Wait for verification
- Create inboxes on your custom domain
Adding a domain
You can add a domain through the AgentMail Console (go to Domains and click Add Domain) or via the API:
The response includes all the DNS records you need to add at your DNS provider.
DNS records you need to add
The MX record is only needed if you want to receive emails on your custom domain. If you only need to send, you can skip the MX record.
For step-by-step DNS setup instructions, see our provider guides: Cloudflare, GoDaddy, Route 53, Namecheap.
Verifying your domain
After adding DNS records, verify your domain:
You can also verify from the AgentMail Console by navigating to the Domains section and clicking Verify Domain.
Verification status will progress through these stages:
Creating inboxes on your domain
Once verified, you can create inboxes using your custom domain:
Tips
- Use a subdomain (e.g.,
mail.yourcompany.com) if you don’t want to modify your root domain’s MX records or risk conflicts with existing email services - Verification time varies by DNS provider, from a few minutes (Cloudflare, Route 53) to 30 minutes or more (GoDaddy, Namecheap)
- One SPF record per domain: if you already have an SPF record, merge AgentMail’s
include:into the existing record rather than creating a second one For a detailed walkthrough, see the Creating Custom Domains guide.
