How I Got a Custom-Domain Email for Free (Cloudflare + Gmail + Brevo)

Written by

at

in

Having you@yourdomain.com instead of yourname1987@gmail.com looks more professional, and it’s portable if you ever switch providers. But the usual way to get it is Google Workspace or Microsoft 365, which costs money every month, per mailbox.

You don’t need either. With a domain, a free Cloudflare account, and the Gmail account you already have, you can get full two-way email on your own domain. The only cost is the domain itself, which is a small yearly fee.

The idea

You don’t host a mailbox. Instead you split the job in two:

  • Inbound: Cloudflare Email Routing receives mail for your domain and forwards it to your Gmail inbox.
  • Outbound: Gmail’s “Send mail as” feature lets you compose and reply from your custom address, all inside the Gmail interface you already use.
Internet → Cloudflare Email Routing → your Gmail inbox
Gmail → "Send mail as" SMTP relay → recipient (From: you@yourdomain.com)

You never leave Gmail, there’s no mail server to run, and nothing recurs on your bill except the domain.

What you’ll need

  • A domain whose nameservers you can change
  • A free Cloudflare account
  • An existing free Gmail account

Step 0: Buy a domain (the only cost)

If you don’t own one yet, any registrar works as long as it lets you change nameservers. Namecheap, Porkbun, and GoDaddy all qualify.

When checking out, decline the paid add-ons like “Private Email” or premium DNS. You don’t need them, because Cloudflare will host your DNS and Gmail will handle your mail. Keep the free WHOIS privacy on so your personal details stay out of public records.

Step 1: Move your DNS to Cloudflare

Email Routing needs Cloudflare to be the authoritative DNS host for your domain, so:

  1. Add your domain to Cloudflare on the Free plan.
  2. Review the DNS records Cloudflare imports. The scan is best-effort and can miss TXT or MX records, so check them by hand.
  3. At your registrar, replace the nameservers with the two Cloudflare gives you.
  4. Wait for the zone to show Active. This takes minutes to a day. You can check with dig NS yourdomain.com +short.

Before moving on, confirm that any existing records you rely on (website, verification TXT records, and so on) survived the move. A broken zone causes confusing failures later.

Step 2: Turn on Email Routing (inbound)

In the Cloudflare dashboard, go to Email → Email Routing → Get started.

  1. Add your Gmail address as a destination and click the verification link Cloudflare sends you.
  2. Let Cloudflare add the MX and SPF records for you.
  3. Set up a catch-all rule that sends to your Gmail.

The catch-all is the best part. Every possible address at your domain, whether hello@, shop@, or anything-you-make-up@, lands in your inbox with no per-address setup. It’s handy for signing up for services, because you can use a different address for each one and see exactly who leaks or sells your data.

Watch out for SPF. If you already had an SPF record, Cloudflare may create a second one. A domain must have only one v=spf1 TXT record, so merge them:

v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all

Then add a basic DMARC record in monitor-only mode:

Name:  _dmarc
Type:  TXT
Value: v=DMARC1; p=none; rua=mailto:you@yourdomain.com

Test it by sending a message to your custom address from a different account. It should reach your Gmail within a minute or two.

Step 3: Send as your domain from Gmail (outbound)

Receiving is the easy half. For sending:

  1. Enable 2-Step Verification on your Google account (required for App Passwords).
  2. Create an App Password in your Google Account security settings. Copy it right away, because it’s shown only once.
  3. In Gmail, go to Settings → See all settings → Accounts and Import → Send mail as → Add another email address.
  4. Enter your name and you@yourdomain.com, then use these SMTP settings:
FieldValue
SMTP Serversmtp.gmail.com
Port587
Usernameyour full Gmail address
Passwordthe App Password
SecurityTLS
  1. Gmail sends a confirmation to your new address. Thanks to Step 2, it arrives in the same inbox. Click the link or paste the code.

One setting is easy to miss. Under When replying to a message, choose “Reply from the same address the message was sent to.” Without it, replies to mail sent to your domain go out from your @gmail.com address, which breaks the illusion.

At this point you have working two-way email, but there’s a catch.

The catch: DKIM alignment

Gmail’s relay signs outgoing mail with Google’s DKIM key (d=gmail.com), not your domain’s. Your message says it’s from yourdomain.com but is cryptographically signed by gmail.com. That mismatch fails DMARC alignment, and strict receivers such as iCloud and Apple Mail may send your mail straight to spam.

For casual replies to people who already know you, this often goes unnoticed. For cold emails to new contacts, it’s a real problem.

Step 4: Fix it for free with Brevo

The fix is to swap Gmail’s relay for a transactional email provider that signs mail with your own domain’s key. Brevo’s free tier needs no credit card and easily covers personal-volume sending. Gmail still works exactly as before. Only the relay behind the scenes changes.

  1. Create a free Brevo account.
  2. Authenticate your domain. Go to Senders, Domains, IPs → Domains → Add a domain. Pick the Manual method, so Brevo shows you the DNS records without needing access to your Cloudflare account.
  3. Add the records in Cloudflare. You’ll add one verification TXT record and two DKIM CNAME records. Skip Brevo’s suggested DMARC record if you already have your own, because two _dmarc records are invalid. Set the CNAMEs to DNS only (grey cloud), since a proxied CNAME breaks DKIM lookups. Then click Verify in Brevo.
  4. Add a sender for you@yourdomain.com. Since the domain is already authenticated, it’s usable immediately.
  5. Generate an SMTP key under SMTP & API. Copy it immediately, because Brevo shows it only once. You may need a one-time SMS verification.
  6. Point Gmail at Brevo. Edit your “Send mail as” entry and set:
FieldValue
SMTP Serversmtp-relay.brevo.com
Port587
Usernameyour Brevo SMTP login (xxxx@smtp-brevo.com)
Passwordthe SMTP key
SecurityTLS

Proving it works

Don’t just check whether the email landed in the inbox. If you reply to someone you’ve corresponded with before, spam filters may trust you regardless of your DKIM setup. Check the headers instead.

Send a message to an external address, open the raw source or “Show original,” and look for the Authentication-Results header. You want:

dkim=pass header.d=yourdomain.com
dmarc=pass header.from=yourdomain.com
spf=pass

If header.d shows your domain rather than gmail.com, you’ve fixed alignment at the protocol level.

A maintenance gotcha: the 90-day expiry

Brevo expires SMTP keys after 90 days of inactivity. If you don’t send any mail for three months, Gmail’s “Send mail as” will quietly start failing, and you’ll only find out when a message bounces.

The fix is a tiny scheduled job. A free GitHub Actions workflow can send one harmless email through the same SMTP key on the 1st of each month using plain curl. Store the SMTP key as a repository secret and the login and addresses as repository variables. As a bonus, if you send the monthly email to your Gmail, it doubles as a regular check that outbound mail still works.

The limitations

This setup is free, but it isn’t a hosted mailbox:

  • Your mail always lives in Gmail. You can’t host a mailbox on your domain for free.
  • Gmail’s standard sending limits apply (500 recipients per day on a free personal account).
  • You’re relying on a few free tiers, so it’s worth keeping an eye on their terms.

For a personal domain, a side project, or a freelance identity, those trade-offs are usually fine.

Wrapping up

With a domain, Cloudflare, Gmail, and Brevo, you get:

  • Unlimited addresses at your domain through catch-all routing
  • Sending and replying from your own domain inside Gmail
  • Fully aligned SPF, DKIM, and DMARC
  • A recurring cost of zero beyond the domain

The setup takes an evening, and most of that is waiting for DNS to propagate.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *