LAB FIELDGUIDE · 10 MIN CONFIGURATION$0/MO FOREVER

Get a free custom domain email forever with Cloudflare & Gmail.

Stop paying $6–$10/month for Google Workspace or Microsoft 365 just for a professional address. Receive incoming emails at [email protected] in your personal Gmail and send two-way replies with 100% deliverability for $0/year.

Engineering fieldguide by Ayush Singh·Cloudflare Edge DNS & Google SMTP·Theme-Matched: AMOLED & Warm Paper
01 / ARCHITECTURE & COST BENEFIT

Why pay $72/year per mailbox?

Paid email suites charge per user per month. Cloudflare provides enterprise edge mail routing for free, handling spam filtering and TLS termination before forwarding to your trusted Gmail account.

PAID WORKSPACE ($72–$144/YR)

Google Workspace

Charges $6–$12/month per seat. Managing multiple aliases or staging mailboxes scales costs quickly for solo engineers and small teams.

DELIVERABILITY

Anti-Spam & DMARC

Uses Google’s high-reputation outbound IP pools coupled with Cloudflare DNS-enforced SPF and DMARC alignments for pristine inboxing.

02 / INTERACTIVE SETUP TRACKER

Step-by-step checklist.

Follow along in your Cloudflare and Google account settings. Check off each step as you complete it:

03 / INCOMING ROUTING CONFIGURATION

1. Enable Cloudflare Email Routing.

Log in to the Cloudflare Dashboard , select your domain, and click Email → Email Routing.

1

Add Destination Address

Under Destination addresses, add your personal Gmail address (e.g. [email protected]). Cloudflare will send a verification link to that inbox. Click the link to verify.

2

Create Custom Address

Under Custom addresses, click Create address. Enter hello (or contact) and set the action to Send to [email protected].

3

Auto-Apply DNS Records

Cloudflare will prompt to automatically insert 3 MX records and 1 SPF TXT record into your DNS table with a single click.

TypeNameValue / TargetPriority
MX@route1.mx.cloudflare.net48
MX@route2.mx.cloudflare.net55
MX@route3.mx.cloudflare.net78
TXT@v=spf1 include:_spf.mx.cloudflare.net ~all—
04 / OUTGOING TWO-WAY SENDING

2. Send from [email protected] inside Gmail.

Now you can receive emails. But when you reply, you want your reply to say From: [email protected] instead of your personal Gmail. Here is how to configure free outgoing SMTP in 3 minutes:

A

Generate a Google App Password

1. Visit Google Account Security and ensure 2-Step Verification is ON.
2. Search for App passwords (or visit myaccount.google.com/apppasswords).
3. Create a new App Password named "Cloudflare Custom Email".
4. Copy the generated 16-character code (e.g. abcd efgh ijkl mnop).

B

Add 'Send mail as' in Gmail

1. Open Gmail → Settings (Gear icon) → See all settings → Accounts and Import.
2. In the "Send mail as:" section, click Add another email address.
3. Enter your Name and your custom email (e.g. [email protected]). Uncheck "Treat as an alias".
4. Click Next Step.

C

Fill in SMTP Server Credentials

- SMTP Server: smtp.gmail.com
- Port: 587
- Username: Your personal Gmail address (e.g. [email protected])
- Password: The 16-character Google App Password created in step A.
- Secured connection: TLS (recommended).

D

Verify Confirmation Code

Google will send a confirmation code to [email protected]. Because Cloudflare is already forwarding to your Gmail, the code will land in your inbox within seconds! Enter the code to confirm.

05 / DELIVERABILITY & SECURITY

3. Hardening SPF & DMARC for 10/10 Inboxing.

Major mail providers (Google, Yahoo, Apple Mail) enforce strict authentication. Because you are receiving via Cloudflare and sending via Google SMTP, combine both in your SPF record so neither flags your emails as spoofed:

RecordNameValueWhy it's essential
TXT@v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~allAuthorizes both Cloudflare routing and Google's outbound SMTP servers.
TXT_dmarcv=DMARC1; p=none; rua=mailto:[email protected]Protects your brand domain from phishing and impersonation attacks.
PROMPT · CLOUDFLARE DNS & DMARC GENERATOR PROMPT
I am setting up free custom domain email routing on Cloudflare for my domain [yourdomain.com] to forward to my Gmail [[email protected]].

Please give me:
1. The exact DNS records (MX, TXT SPF, TXT DMARC) I need to add to Cloudflare.
2. The SPF record that allows BOTH Cloudflare Email Routing (for receiving) AND Gmail SMTP / Resend (for sending).
3. A strict DMARC record to protect my domain from email spoofing.
4. Step-by-step instructions to configure Gmail "Send mail as" using a Google App Password so my outgoing emails show "From: [email protected]" with zero monthly cost.
06 / TROUBLESHOOTING & FAQS

Common questions.

Will my personal Gmail leak?

When sending via Google SMTP with App Passwords, the From: header displays your custom domain (e.g. [email protected]). Most recipients only see your professional domain address.

Can I have multiple aliases?

Yes! You can configure unlimited aliases in Cloudflare (contact@, press@, billing@, jobs@) or enable a Catch-all rule to route all incoming mail to the same Gmail.

What is the daily sending limit?

Standard free Google accounts allow up to 500 sent emails per day, which is more than enough for portfolios, consultants, and developers.

How do I test my deliverability?

Send a test email from your Gmail (selecting your custom domain address) to mail-tester.com . With the combined SPF and DMARC records above, you will score a perfect 10/10.

Explore more platform engineering guides

Check out our procedural SVG Mascot Lab with 23 animated moods, or explore production web platform case studies built with TYPO3, PHP, Vue, and Cloudflare.