Custom Domains (BYOD)
Connect a domain you own to receive and send emails using custom branding (Team plan).
What you get
Open inboxes like support@yourdomain.com. Incoming mail lands in MailFlat; outgoing mail is signed with your domain's own DKIM, so it passes SPF/DKIM/DMARC and shows up as coming from your brand, not from mailflat.net.
Setup
- Add the domainDomains → type yourdomain.com → Add domain. You get five DNS records.
- Add the DNS recordsAt your DNS provider. Read the provider notes below first. That is where nearly every failed setup goes wrong.
- VerifyWait a few minutes for DNS to propagate, then click Verify. The badge turns green.
- Open an inbox on itNew inbox → pick your domain from the dropdown → support@yourdomain.com.
The five records
| Type | Host | Purpose |
|---|---|---|
| TXT | _mailflat-verify | Proves you own the domain (required to verify) |
| MX | @ | Routes incoming mail to MailFlat (mail.mailflat.net, priority 10) |
| TXT | @ | SPF, authorizes MailFlat to send for you |
| TXT | mail._domainkey | DKIM, signs your outgoing mail |
| TXT | _dmarc | DMARC policy |
Provider notes, read before pasting
These five gotchas cause almost every failed verification
Nothing here is MailFlat-specific. It is how each registrar's DNS editor behaves.
Namecheap, GoDaddy, name.com: the Host fieldEnter the subdomain part only
Their Host field wants only the subdomain: type _mailflat-verify, not _mailflat-verify.yourdomain.com, because they append the domain automatically. The dashboard shows the full name; drop the .yourdomain.com suffix.
Cloudflare, Route 53: paste as shownThey accept the full name
These accept the full record name exactly as the dashboard prints it. No trimming needed.
MX on Namecheap lives somewhere elseMail Settings → Custom MX
It is not in the normal Host Records list. Switch the Mail Settings dropdown to Custom MX first, then add the record there.
One SPF record per domainMerge, never add a second
If your domain already has a v=spf1… record, whether from email forwarding or another sender, replace it with a merged one. Two SPF records make both invalid.
DKIM is long, do not retype itPaste on one line with the copy button
Use the copy button next to the record so nothing is truncated, and make sure your provider does not wrap it across lines.
Use it from your code
# open an inbox on your domain (domain_id from GET /api/domains)
curl -X POST https://mailflat.net/api/inboxes \
-H "Authorization: Bearer <token>" \
-d '{ "prefix": "support", "domain_id": 1 }'
# → support@yourdomain.com
# send from your domain, signed with your DKIM
curl -X POST https://mailflat.net/api/inboxes/support@yourdomain.com/send \
-H "Authorization: Bearer <token>" \
-d '{ "to": "user@gmail.com", "subject": "Your code", "body": "123456" }'
# read incoming mail (OTP auto-extracted), same as any inbox
curl https://mailflat.net/api/inboxes/support@yourdomain.com/emails/latest \
-H "Authorization: Bearer <token>"