Custom Domains

Send and receive email from your own domain instead of @lobstermail.ai.

Last updated 2026-02-23

Why custom domains#

By default, LobsterMail inboxes use @lobstermail.ai addresses. Custom domains let your agent send from addresses like agent@yourdomain.com — more professional, better deliverability, and full brand control.

Custom domains require the Pro plan.

Add a domain#

const domain = await lobster.domain.add("yourdomain.com");

This returns DNS records you need to configure:

{
  "domain": "yourdomain.com",
  "status": "pending",
  "records": [
    {
      "type": "MX",
      "name": "yourdomain.com",
      "value": "mx.lobstermail.ai",
      "priority": 10
    },
    {
      "type": "TXT",
      "name": "yourdomain.com",
      "value": "v=spf1 include:lobstermail.ai ~all"
    },
    {
      "type": "CNAME",
      "name": "lobster._domainkey.yourdomain.com",
      "value": "dkim.lobstermail.ai"
    }
  ]
}

Configure DNS#

Add these records at your DNS provider (Cloudflare, Namecheap, Route 53, etc.):

  1. MX record — Routes incoming email to LobsterMail
  2. SPF record — Authorizes LobsterMail to send on your behalf
  3. DKIM record — Signs outbound emails for authentication

Verify the domain#

After adding DNS records, verify:

const status = await lobster.domain.verify("yourdomain.com");
console.log(status); // "verified" or "pending"

DNS changes can take up to 48 hours to propagate, but most providers update within minutes.

Create inboxes on your domain#

Once verified, create inboxes using your domain:

const inbox = await lobster.inbox.create({
  domain: "yourdomain.com",
  prefix: "support", // → support@yourdomain.com
});

If you omit prefix, LobsterMail generates one automatically (e.g., agent-k4m2@yourdomain.com).

List and remove domains#

// List all domains
const domains = await lobster.domain.list();

// Remove a domain
await lobster.domain.remove("yourdomain.com");

Removing a domain deactivates all inboxes on that domain. Existing messages are preserved for 30 days.

What's next#