Home Portfolio Electronics Projects Embedded Systems CS Projects IoT & Security Blog About Contact
 Home How to Use a Custom Domain Email with Gmail Using Cloudflare Email Routing

How to Use a Custom Domain Email with Gmail Using Cloudflare Email Routing

March 05, 2026 Umayanga 0 comments
Free Custom Domain Email — Cloudflare + Gmail Guide
☁ Cloudflare
✉ Gmail SMTP
Free Setup

Free Custom Domain Email
with Cloudflare + Gmail

Use contact@yourdomain.com with your existing Gmail inbox — no Google Workspace subscription needed.

INCOMING

Sender
MX Records
Cloudflare Routing
Gmail Inbox

OUTGOING

Gmail Compose
Gmail SMTP
Recipient

Before You Start

🌐A registered domain name
DNS managed via Cloudflare
An existing Gmail account

Configure Email Routing in Cloudflare

STEP 01 Enable Cloudflare Email Routing

Open the Cloudflare dashboard and select your domain. Navigate to Email → Email Routing and click Enable Email Routing.

dash.cloudflare.com

developers.cloudflare.com/email-routing Cloudflare Email Routing MX Records

Cloudflare automatically creates the required MX records:

MX 10route1.mx.cloudflare.net
MX 20route2.mx.cloudflare.net
Add Destination Address

Add your Gmail address as the forwarding destination. Cloudflare sends a verification email — open Gmail and confirm it.

Destination:yourgmail@gmail.com
Create a Routing Rule

Set up a routing rule to forward your custom address to Gmail.

Custom Address:contact@yourdomain.com
Destination:yourgmail@gmail.com

Any email sent to contact@yourdomain.com will now arrive in your Gmail inbox.

Create a Google Account with Your Custom Email

STEP 02 Google Account Signup

Go to the Google account creation page and choose "Use my current email address instead". Enter your custom domain email.

accounts.google.com/signup Google Signup Custom email signup
Email:contact@yourdomain.com

Google sends a verification code which arrives in your Gmail via Cloudflare forwarding.

Add Profile Picture

Go to myaccount.google.comPersonal Info → Profile Picture and upload your image. This appears on emails you send.

Generate a Gmail App Password

STEP 03 Create App Password for SMTP

Gmail SMTP requires an App Password (not your regular password).

myaccount.google.com/apppasswords
1.Security → Enable 2-Step Verification
2.Security → App Passwords
3.App: Mail · Device: Other (Custom)
4.Click Generate

Google generates a 16-character password:

abcd efgh ijkl mnop
⚠ Save this password immediately — it will not be shown again.

Add Custom Email in Gmail Send-As

STEP 04 Gmail Settings → Accounts and Import

In Gmail go to Settings → See all settings → Accounts and Import → Send mail as → Add another email address.

mail.google.com Gmail Settings Add email address SMTP Configuration
SMTP Server Settings
FieldValue
SMTP Serversmtp.gmail.com
Port587
Usernameyourgmail@gmail.com
Password[App Password from Step 3]
⚠ Username = your Gmail address, not your custom domain address.
Verify Email Address

Gmail sends a verification email to your custom address. It arrives in Gmail via Cloudflare forwarding. Enter the code or click the confirmation link.

Test Sending Email

STEP 05 Send a Test Email from Your Custom Domain

In Gmail, click Compose and use the From dropdown to select your custom domain address.

From:contact@yourdomain.com
To:another@email.com
Subject:Test custom domain email
Body:Testing Cloudflare email routing setup.

If configured correctly, the recipient sees contact@yourdomain.com as the sender.

Setup Summary

Domain DNS
Cloudflare
Incoming Mail
CF Email Routing
Mailbox
Gmail
Outgoing Mail
Gmail SMTP

Why This Setup?

Completely free custom domain email
No Google Workspace subscription
Familiar Gmail interface
Easy DNS management via Cloudflare

Official Documentation

Problem:  Commercial power monitors are too expensive and lack modular network integration.
Approach:  Engineered a custom IoT module featuring a highly precise sampling IC and seamless WiFi connectivity.
Future:  Integrating AI-based energy usage profiling.
Cloudflare Email Routing  +  Gmail SMTP  ·  Free Custom Domain Email Setup