Skip to content

Domain Verification

Domain verification in RelayPost proves to receiving mail servers that you authorized RelayPost to send email for your domain. RelayPost generates DKIM keys and a DMARC record you add to DNS, then verifies them automatically. Verified domains achieve significantly better inbox placement.

When you add a domain, RelayPost generates:

  • A DKIM key pair — used to cryptographically sign your emails
  • A DMARC record — that tells receiving servers how to handle authentication failures
  • DNS records — that you add to your domain’s DNS settings

Once the records are in place, RelayPost verifies them and marks your domain as verified.

Note: SPF is handled automatically by RelayPost’s sending infrastructure (via the MAIL FROM domain). You do not need to add an SPF record for RelayPost.

  1. Add the domain

    POST /api/v1/domains

    Terminal window
    curl -X POST https://api.relaypost.dev/v1/domains \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{ "domain": "yourapp.com" }'

    Response:

    {
    "data": {
    "id": "dom_abc123",
    "domain": "yourapp.com",
    "is_verified": false,
    "dkim_verified": false,
    "dkim_selector": "relaypost",
    "dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
    "dns_records": [
    {
    "type": "TXT",
    "name": "relaypost._domainkey.yourapp.com",
    "value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4..."
    },
    {
    "type": "TXT",
    "name": "_dmarc.yourapp.com",
    "value": "v=DMARC1; p=quarantine"
    }
    ],
    "created_at": "2025-01-15T10:30:00.000Z"
    }
    }

    The response includes the dkim_selector and dkim_public_key you’ll need for DNS. SPF is handled automatically by RelayPost’s sending infrastructure.

  2. Add DNS records

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

    DKIM record (TXT)

    FieldValue
    TypeTXT
    Name{dkimSelector}._domainkey.yourapp.com
    Valuev=DKIM1; k=rsa; p={dkimPublicKey}

    DMARC record (TXT)

    FieldValue
    TypeTXT
    Name_dmarc.yourapp.com
    Valuev=DMARC1; p=quarantine
  3. Trigger verification

    DNS propagation can take up to 48 hours, but usually completes within minutes. Once propagated:

    GET /api/v1/domains/:id/verify

    Terminal window
    curl "https://api.relaypost.dev/v1/domains/dom_abc123/verify" \
    -H "Authorization: Bearer YOUR_API_KEY"

    Response:

    {
    "data": {
    "id": "dom_abc123",
    "domain": "yourapp.com",
    "is_verified": true,
    "dkim_verified": true,
    "dkim_selector": "relaypost",
    "dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
    "verified_at": "2025-01-15T11:00:00.000Z",
    "created_at": "2025-01-15T10:30:00.000Z"
    }
    }

    The response shows which checks passed. dkim_verified must be true for full verification.

GET /api/v1/domains

Terminal window
curl "https://api.relaypost.dev/v1/domains" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"data": [
{
"id": "dom_abc123",
"domain": "yourapp.com",
"is_verified": true,
"dkim_verified": true,
"dkim_selector": "relaypost",
"dkim_public_key": "MIGfMA0GCSqGSIb3DQEBAQUAA4...",
"verified_at": "2025-01-15T11:00:00.000Z",
"created_at": "2025-01-15T10:30:00.000Z"
}
]
}
IssueSolution
DKIM failsCheck the selector name matches exactly: {selector}._domainkey.yourapp.com
DMARC failsEnsure the TXT record is at _dmarc.yourapp.com with value starting with v=DMARC1
Both failDNS may not have propagated yet — wait 15-30 minutes and try again
Still failingSome DNS providers add quotes around TXT values automatically — make sure there aren’t double quotes

DNS propagation typically completes within 5–30 minutes, though it can take up to 48 hours in rare cases. Once DNS records are in place, trigger a verification check from the API or dashboard.

You need two TXT records: a DKIM record at selector._domainkey.yourdomain.com with your public key, and a DMARC record at _dmarc.yourdomain.com with your DMARC policy. SPF is handled automatically by RelayPost’s sending infrastructure.

Common causes: DNS records haven’t propagated yet (wait 15–30 minutes), the DKIM selector name doesn’t match exactly, your DNS provider added extra quotes around the TXT value, or you have multiple SPF records on the same domain (merge them into one).