How to Set Up a Custom Domain Email with Resend and Cloudflare
AI Summary · Serial Entrepreneur Perspective (The following content is distilled by AI; views belong to the original author; you can skip the full article after reading)
The blogger tested using Resend (SMTP email sending, 3000 emails/month free) + Cloudflare (Email Routing forwarding + DNS management) + Gmail to send and receive emails at support@yourdomain.com at zero cost. Steps include: Resend generates DNS records, Cloudflare configures SPF/DKIM/DMARC/MX routing, and Gmail fills in SMTP account details. This suits indie developers and early-stage teams, saving enterprise mailbox subscription fees. Scale up later by migrating to Zoho ($1/month).
- Adopt this stack directly, validate within the week, cost=0
- Avoid spam folder issues caused by SPF soft fails or missing DMARC
- Remember the 3000-email limit; plan migration path before exceeding it
Zero-Cost Custom Domain Email: Resend + Cloudflare + Gmail Live Setup
Having a custom domain mailbox (e.g., support@yourdomain.com) is the minimum professional setup for indie developers and startup teams. Compared to Google Workspace or Microsoft 365 subscription fees, combining Resend (SMTP sending), Cloudflare (Email Routing forwarding), and personal Gmail enables a fully zero-cost send/receive loop.
Core logic: Cloudflare handles DNS management and email routing reception, Resend provides SMTP sending capability, and Gmail serves as the unified operation interface. Resend's free tier covers 3000 emails per month, sufficient to cover business inquiries and notifications in the early product stage.
Step 1: Resend Sending Capability Configuration
Resend generates DNS records and completes SMTP authentication, which is key to ensuring emails are not flagged as spam.
- Create API Key: After registering, go to Dashboard → API Keys → Create API Key, select "Sending access" permission, and copy the generated Key (format re_xxxx).
- Add Domain: Go to Domains → Add Domain, enter your domain. Resend automatically generates the required DNS records; click "Auto-configure" to jump to Cloudflare for direct modification.
Step 2: Cloudflare DNS and Routing Configuration
This step resolves two questions: "who is authorized to send" and "where emails are received." Carefully verify the following records:
- SPF Record (authorize sender): Add TXT record
v=spf1 include:_spf.mx.cloudflare.net include:_spf.resend.com ~all. This tells receiving servers that Resend and Cloudflare are your legitimate sending channels. - DKIM Record (tamper-proof signature): Add the TXT record provided by Resend to verify that email content has not been modified.
- DMARC Record (security policy): Add
v=DMARC1; p=none;. During initial testing, set it to none for debugging; tighten it gradually later. - Email Routing (email reception): Enable the service in Cloudflare Dashboard → Email → Email Routing. The system will automatically add MX records pointing to
route.mx.cloudflare.net. Then add a rule in Routing Rules: fillsupportas Custom address, select Forward to for Action, and fill your personal Gmail address as Destination.
Step 3: Gmail Sending Integration
After DNS propagation completes (usually a few minutes to hours), configure "Send mail as" in Gmail:
- Go to Gmail Settings → See all settings → Accounts and Import → Send mail as → Add another address.
- Fill in your name and custom domain email address, and check "Treat as alias."
- For SMTP server, enter
smtp.resend.com, port 465, usernameresend, password the API Key saved earlier, and connection security SSL.
Next Action: Configure following this chain within the week. First, send a test email from your personal mailbox to your custom domain, confirming that both Inbox and Sent folders display normally. If you encounter delivery issues, prioritize checking whether SPF and DKIM are active.
Original · Dax's Blog: Read Original →
Related Tool Recommendation (Sponsored): Quickly obtain common configuration parameters such as SMTP, IMAP, POP3, and EAS for email setup.