Verify your domain for production email delivery
Configure DNS records for SPF, DKIM, and DMARC with step-by-step guidance.
Last updated April 2026
Overview
Verify your sending domain to improve deliverability and prove to mailbox providers that you own the domain. BaviMail requires SPF, DKIM, DMARC, and Return-Path DNS records.
Verification Steps
1
Add Your Domain
Register your sending domain via the SDK.
import { BaviMail } from 'bavimail'
const client = new BaviMail()
const domain = await client.domains.create({ domain: 'mail.yourcompany.com' })
console.log('Domain ID:', domain.id)
console.log('DNS records to add:', domain.dnsRecords)2
Add DNS Records
Add the records returned by the API to your DNS provider. You will receive records for:
| Record | Type | Purpose |
|---|---|---|
| SPF | TXT | Authorizes BaviMail's IP addresses to send email on behalf of your domain. |
| DKIM | CNAME | Cryptographic signature that proves the email was sent by an authorized server and was not altered in transit. |
| DMARC | TXT | Tells receiving servers how to handle email that fails SPF or DKIM checks. |
| Return-Path | CNAME | Routes bounce notifications back to BaviMail so you get delivery feedback. |
3
Trigger Verification
Once you have added the DNS records, trigger verification:
const result = await client.domains.verify(domain.id)
console.log('Status:', result.status) // 'pending' | 'verified' | 'failed'BaviMail checks your DNS records automatically every few minutes. You can also trigger a manual check from the dashboard.
4
Start Sending
Once status is verified, you can create aliases on the domain and send email.
Common Issues
- DNS propagation takes time. Most providers propagate within minutes, but some take up to 48 hours. If verification fails, wait and retry.
- CNAME conflicts. Some DNS providers don't allow a CNAME at the zone apex. Use a subdomain (e.g.,
mail.yourcompany.com) instead. - Existing SPF records. If you already have an SPF record, merge it with the BaviMail include rather than creating a second TXT record. Multiple SPF records cause failures.
- DMARC policy too strict. Start with
p=nonewhile testing, then move top=quarantineorp=rejectonce you confirm delivery is working.
Multiple SPF TXT records on the same domain will cause verification failures. Merge them into a single record.