Skip to content

Transactional mail DNS on Cloudflare: SES, SendGrid, and Postmark records that actually verify

Fix Amazon SES, SendGrid or Postmark domain verification that stays on pending when your DNS is on Cloudflare. You will set each provider's CNAME and TXT records to DNS-only so the checks pass within minutes.

If your app sends receipts and password resets through Amazon SES, SendGrid or Postmark, and your DNS is on Cloudflare, domain verification can stall on “pending”. The usual cause is the orange cloud, Cloudflare’s proxy switch. A proxied CNAME answers with Cloudflare’s own IP addresses and hides the target the provider expects. The provider’s check then fails, or DKIM (the signature that proves your mail really came from your domain) never switches on. The fix is to create every verification, DKIM, bounce and tracking record exactly as the provider shows it, with the proxy off (grey cloud, “DNS only”). The checks then usually pass within minutes.

What’s happening

When a provider validates domain ownership or DKIM, its resolver asks for your record and compares the response to the expected target — s1._domainkey.example.com must visibly be a CNAME to their hostname, not an A record answering with 104.16.x.x. The proxy exists to hide origin infrastructure behind Cloudflare’s edge, which is precisely the opposite of what a verification record is for. DKIM selectors containing _domainkey usually stay grey because of the underscore, but the records without underscores — SES bounce domains, SendGrid’s em1234 sender domain and url1234 link-branding names, Postmark’s pm-bounces — are ordinary-looking hostnames that Cloudflare will cheerfully proxy if the toggle is on, and those are the ones that stick on pending.

Tracking and link-branding domains deserve one extra sentence: they carry real HTTP traffic (open pixels, click redirects), so proxying them seems plausible. Providers handle TLS for these hostnames themselves, and their documentation specifies the proxy status they support — SendGrid, for instance, documents a specific Cloudflare-proxied procedure for SSL click tracking. The operating rule: create what the provider’s DNS panel shows, DNS-only, and only deviate where their docs explicitly describe the proxied variant.

What to check first

  • What the provider’s DNS page says, verbatim. Names, targets, types. The values are account-specific — u1234567 and token strings are not from a template.
  • Proxy status of every record the provider issued. All grey unless their docs say otherwise.
  • Whether the name got doubled. Cloudflare appends the zone: enter em1234, not em1234.example.com, or you mint em1234.example.com.example.com.
  • Your SPF record, if the provider asked for an include or a bounce-domain SPF — one v=spf1 record per name, merged not appended.

How to verify

# CNAMEs must answer as CNAMEs, from a neutral resolver
dig @1.1.1.1 +short CNAME em1234.example.com
dig @1.1.1.1 +short CNAME s1._domainkey.example.com
dig @1.1.1.1 +short CNAME pm-bounces.example.com

# SES custom MAIL FROM domain: MX and SPF on the bounce subdomain
dig @1.1.1.1 +short MX bounce.example.com
dig @1.1.1.1 +short TXT bounce.example.com

An empty CNAME answer plus an A answer full of Cloudflare IPs is the proxied-record signature. After records resolve, send through the provider and confirm authentication end to end:

# Test send through SendGrid's SMTP interface
swaks --to you@your-test-mailbox.net --from app@example.com \
  --server smtp.sendgrid.net:587 --tls --auth-user apikey --auth-password $SENDGRID_API_KEY

# At the destination, expect:
# Authentication-Results: ...; spf=pass ...; dkim=pass header.d=example.com

The provider’s own activity log (SES sending statistics, SendGrid activity feed, Postmark message stream) is the mail log for this path — check it alongside the destination headers.

The fix

  1. Amazon SES: create the three DKIM token CNAMEs, and if you use a custom MAIL FROM domain, its MX and SPF:

    token1._domainkey.example.com  CNAME  token1.dkim.amazonses.com
    token2._domainkey.example.com  CNAME  token2.dkim.amazonses.com
    token3._domainkey.example.com  CNAME  token3.dkim.amazonses.com
    
    bounce.example.com  MX   10 feedback-smtp.ca-central-1.amazonses.com
    bounce.example.com  TXT  v=spf1 include:amazonses.com ~all

    Region in the MX target must match your SES region.

  2. SendGrid: the domain-authentication set — sender domain plus two DKIM CNAMEs, and the link-branding pair if you enabled it:

    em1234.example.com         CNAME  u1234567.wl123.sendgrid.net
    s1._domainkey.example.com  CNAME  s1.domainkey.u1234567.wl123.sendgrid.net
    s2._domainkey.example.com  CNAME  s2.domainkey.u1234567.wl123.sendgrid.net
  3. Postmark: one DKIM TXT and the return-path CNAME:

    20260703._domainkey.example.com  TXT    v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3...
    pm-bounces.example.com           CNAME  pm.mtasv.net
  4. Set every record DNS-only, then click the provider’s Verify button. Cloudflare’s changes are live in seconds; provider caches can take a few minutes.

  5. Update the apex SPF once, deliberately — add the provider’s include to your existing record rather than letting a wizard create a second v=spf1.

  6. Send a test through the provider and read Authentication-Results at the destination before pointing production traffic at it.

When this fix is wrong

If records verify but delivery is poor, DNS is done and the conversation moves to warm-up, volume patterns, and content — provider dashboards, not the zone file. If you are choosing which provider to relay through in the first place, or wiring a server’s outbound to one, that decision and MTA config live in routing server mail through transactional providers.

Common mistakes

  • Orange-clouding em1234 or pm-bounces — the two most common “pending forever” records.
  • Pasting the full hostname into the Name field and doubling the zone.
  • Letting a setup wizard add a second SPF record next to the existing one.
  • Deleting the provider’s records during a zone cleanup because the names look like noise.
  • Creating records in the wrong Cloudflare zone when the account holds several similar domains.

Prevention

Keep the provider’s DNS page and your Cloudflare zone in agreement on every audit: same names, same targets, all grey. Re-run the dig battery after any zone import, since imports can flip proxy status. Reference documentation: SES, SendGrid, Postmark, and Cloudflare’s DNS docs for record handling.

Mail that breaks after a DNS move is one of the most common incidents we untangle — Stack Harbor manages the full DNS and mail path under Managed Cloud Ops; book an infrastructure review before the next migration.