A definitive guide to setting up unlimited custom domain emails (e.g. you@yourdomain.com) routed through Cloudflare and powered by Gmail with zero monthly subscriptions.
π‘ The Core Problem: Every online business, indie builder, and agency needs a professional email address like hello@yourdomain.com. But paying Google Workspace $6 to $18 per user, per month just to communicate with a handful of clients burns cash unnecessarily.
In this guide, you will learn the exact architecture to configure unlimited custom domain emails for $0 monthly fees: receiving inbound emails through Cloudflare's high-speed routing edge and sending outbound emails directly through Gmail's authenticated SMTP infrastructure.
Before diving into DNS records, it is critical to understand what is happening under the hood. Cloudflare Email Routing is primarily an email forwarding and edge receiving service, not a traditional IMAP/POP3 storage server. Meanwhile, your personal Gmail inbox functions as both your user interface and outgoing SMTP relay.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β INBOUND FLOW (RECEIVING) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Sender (Client/Customer)
β
βΌ
Send to: hello@yourdomain.com
β
βΌ
Cloudflare Email Routing (Edge MX Records)
β (Instant forward with SPF/DKIM intact)
βΌ
yourpersonal@gmail.com
β
βΌ
Delivered in your standard Gmail Inbox!
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OUTBOUND FLOW (SENDING) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Compose message in Gmail
β (Select "From: hello@yourdomain.com")
βΌ
Google SMTP Relay (smtp.gmail.com:587)
β (Authenticated with Google App Password)
βΌ
Custom Domain Authentication (SPF, DKIM, DMARC)
β
βΌ
Recipient Inbox (Clean delivery without "via gmail.com")
support@, sales@, billing@ all into one place.
If you don't already own a custom domain, purchase one from any registrar (such as Cloudflare Registrar, Namecheap, GoDaddy, or Google Domains/Squarespace). For instance, throughout this guide, we'll use apna.design or yourdomain.com as our examples.
Create a free account on Cloudflare and click Add a site. Enter your domain name and pick the Free Plan ($0/month).
Cloudflare will assign you two authoritative nameservers (e.g., dawn.ns.cloudflare.com and kurt.ns.cloudflare.com). Go to your registrar's management dashboard, replace the default nameservers with Cloudflare's nameservers, and wait a few minutes for DNS delegation to activate.
In your Cloudflare dashboard, select your domain and click on Email β Email Routing in the left sidebar.
yourname@gmail.com) under Destination addresses.Under Routing rules, click Create address. You can configure individual aliases pointing to your verified destination email:
hello@yourdomain.com β yourname@gmail.comsupport@yourdomain.com β yourname@gmail.combilling@yourdomain.com β yourname@gmail.com
Before proceeding to the sending setup, verify inbound functionality. From a secondary email address or a friend's phone, send a test email to hello@yourdomain.com. Check your Gmail inboxβit should appear within seconds.
This is the step where 95% of people fail and encounter the dreaded error: "Authentication error. Check your username and password". You cannot use your normal personal Gmail password for external SMTP.
1. Open your Google Account at myaccount.google.com/security.
2. Ensure 2-Step Verification is enabled on your Gmail account.
3. In the search bar at the top of your Google Account page, type "App Passwords" (or visit myaccount.google.com/apppasswords).
4. Enter an app name such as Custom Domain Mail and click Create.
5. Google will generate a unique 16-character password (e.g. xxxx yyyy zzzz wwww). Copy this immediatelyβyou will use this as your SMTP password.
Now configure Gmail so that you can select your domain in the "From" dropdown:
hello@yourdomain.comsmtp.gmail.com587yourname@gmail.com)
Gmail will send a confirmation email with a numeric code to hello@yourdomain.com. Because Cloudflare routing is active, that message will arrive instantly in your Gmail inbox! Copy the verification code, paste it into the popup window, and click Verify.
Pro-tip for seamless replies: In Gmail Settings β Accounts and Import β Send mail as, select the radio button:
π "Reply from the same address to which the message was sent"
This guarantees that whenever a client emails your custom business alias, Gmail automatically sets your custom domain as the "From" address on your reply!
Getting sending to work is only half the battle. If you don't configure domain authentication, your emails will either land in spam folders or show an awkward "via gmail.com" warning beside your name.
To fix this, update your DNS records in Cloudflare to authorize both Cloudflare forwarding and Google SMTP relaying:
| Record Type | Name / Host | Value / Target | Purpose |
|---|---|---|---|
| TXT (SPF) | @ | v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all | Authorizes both Cloudflare and Google to send on your behalf. |
| TXT (DMARC) | _dmarc | v=DMARC1; p=none; sp=none; aspf=r; | Specifies anti-spoofing policy for receiving servers. |
| MX | @ | route1.mx.cloudflare.net (Priority 13) route2.mx.cloudflare.net (Priority 61) route3.mx.cloudflare.net (Priority 98) |
Inbound mail servers automatically maintained by Cloudflare. |
Is this hack the right decision for your specific organization? Here is an objective comparison of the top three modern business email options:
| Feature | Cloudflare + Gmail | Zoho Mail Free / Lite | Google Workspace |
|---|---|---|---|
| Monthly Cost | $0.00 / month | Free (up to 5 users) or $1/mo | $6.00 β $18.00 / user / mo |
| Mailbox Storage | Shared Gmail 15GB | 5GB per user mailbox | 30GB to Unlimited Drive + Mail |
| Dedicated Inboxes | No (Forwarding only) | Yes (Native Webmail/IMAP) | Yes (Full Enterprise Suite) |
| Team Collaboration | Limited (Single owner) | Good for small teams | Industry Standard (Meet, Drive, Docs) |
| Setup Complexity | Moderate (10-minute DNS setup) | Moderate | Easy (Automated Wizard) |
| Best For | Solopreneurs, Freelancers, Bootstrapped Startups | Growing small teams needing dedicated logins | Funded startups, Enterprises & Agencies |
You may have seen viral posts claiming:
"Just visit Google's hidden sign-up URL (accounts.google.com/signup/v2/webcreateaccount) and select 'Use my current email address instead' to get free Google Workspace!"
Here is the technical reality: That Google sign-up link allows you to create a standard Google Account using an existing email (for Google Drive, Docs, and YouTube access). However, it does NOT grant you a free Gmail mailbox or SMTP server for your domain. In fact, if you try to use that non-Gmail Google account to send emails, Google will ask you to connect an external mail server anyway!
The true, functional hack that thousands of software engineers use is exactly what we demonstrated above: Cloudflare Email Routing for inbound + Gmail SMTP with App Passwords for outbound.
Yes. Cloudflare does not charge for Email Routing on its free tier, and Google provides free SMTP relaying for personal Google accounts via App Passwords. Your only mandatory expense is registering your own domain name (around $10/year).
Cloudflare operates on one of the most resilient Anycast edge networks in the world with 99.99%+ historical uptime. However, if an inbound mail server is unreachable, standard RFC mail protocol requires the sender's server to retry delivery for up to 72 hours before bouncing.
You cannot enter your normal personal Gmail password! Google deprecated Less Secure Apps in 2022. You must enable 2-Step Verification on your Google Account and generate a 16-character Google App Password, which serves as your SMTP password.
Absolutely! Gmail allows you to add up to 99 "Send mail as" aliases under Accounts and Import. You can manage hello@apna.design and contact@vitabletech.in right alongside each other within one unified inbox.
No! Free Gmail accounts have a sending limit of roughly 500 emails per 24 hours. Automated scripts and mass marketing blasts will quickly flag your Google account for spam abuse. For transactional notifications (OTPs, password resets, invoices), use dedicated services such as Amazon SES, Resend, or Brevo.
Once you have multiple employees who need individual inboxes, privacy, shared company calendars, and administrative access controls, graduate to Zoho Mail ($1/user/mo) or Google Workspace ($6/user/mo). This setup is best suited for solo operators and bootstrappers.
At VitableTech, we engineer scalable cloud architectures, manage DNS security, build enterprise SaaS solutions, and streamline communication pipelines for global brands.
Consult with Our Cloud Architects