Skip to content

SendGrid Domain Auth Playbook (Hostinger Site Mailer)

Origin: Extracted from knowledge/lessons/hosting-and-infra/hostinger.md lesson "Hostinger Site Mailer verification = SendGrid CNAMEs" + CLAUDE.md memory entry reference_site_mailer_sendgrid.md during knowledge restructure (2026-05-20). The procedure body is preserved verbatim below.

What Site Mailer Is

Hostinger Site Mailer is a SendGrid wrapper. When you configure "custom domain" for Site Mailer, the DNS records it asks for are the standard SendGrid set: - 1 CNAME for the sender subdomain (em####) - 2 DKIM CNAMEs (em####._domainkey × 2)

These records live at whatever DNS provider holds the domain — Squarespace, Cloudflare, Hostinger, etc. No nameserver flip required.


Procedure

Step 1: Get the required DNS records

Site Mailer's plugin provides the 3 CNAME values via its Senders tab. You can also read them programmatically:

wp option get site_mailer_verification_records

Records will include: - mail_cname — the em#### subdomain CNAME - dkim1 — first DKIM CNAME (em####._domainkey) - dkim2 — second DKIM CNAME (em####._domainkey)

Step 2: Soften DMARC first (if strict policy is set)

If the domain has a p=reject or p=quarantine DMARC policy, soften to p=none before adding SendGrid records. This prevents emails bouncing during the verification window.

Step 3: Add DNS records

Add the 3 CNAMEs at the domain's DNS provider. If on Cloudflare, use the Cloudflare API or dashboard — set proxy to DNS only (grey cloud) for DKIM records.

Step 4: Verify

After DNS propagates (usually <5 min on Cloudflare, up to 1 hour on others), click Verify in Site Mailer's Senders tab, or call:

// Via WP-CLI eval
Domain_Handler::verify_domain();

Verification status confirms via:

wp option get site_mailer_verification_status
# should return: verified

Step 5: Confirm

wp option get site_mailer_verification_records
# Check validation_results.mail_cname, dkim1, dkim2 — all should show valid

Key lesson

Pattern: Spent time hunting for "Site Mailer DKIM" records — searched s1._domainkey, sm._domainkey, hostingermail-*, etc. None existed. Site Mailer's plugin status showed verification_status: verified with validation_results.mail_cname valid for record em3689 and dkim1/dkim2 valid for em605._domainkey / em6052._domainkey. Those are SendGrid's records. Rule: The SendGrid records added for any other reason (e.g., Mailchimp domain auth, prior SendGrid setup) ARE Site Mailer's verification records. Don't hunt for "Site Mailer-specific" DKIM records — they don't exist as a separate set. [Source: knowledge/lessons/hosting-and-infra/hostinger.md — "Hostinger Site Mailer verification = SendGrid CNAMEs"]


WP Rocket conflict (critical)

WP Rocket's "Minify JS locally" caches the reCAPTCHA enterprise.js and drops the ?render=KEY parameter. This also affects Site Mailer's JavaScript. The canonical mu-plugin ships WP Rocket exclude filters — verify these are in place on any new deployment.

[Source: CLAUDE.md memory feedback_wp_rocket_recaptcha_conflict.md]