Custom Domain Emails for free
Source: Dev.to
Overview
Can’t pay for a full Google Workspace account just to send and receive professional emails from your custom domain? You don’t have to. By using Cloudflare for inbound routing and Gmail’s SMTP for outbound sending, you can have a fully functional custom‑domain address (e.g., info@example.com) inside your personal Gmail inbox.
Part 1: Setting Up the Receiving Funnel (Cloudflare Email Routing)
Goal: Forward all mail sent to info@example.com to your personal Gmail address (your-name@gmail.com).
-
Access Email Routing
Log in to the Cloudflare dashboard, select your domain, and go to Email > Email Routing. -
Enable Email Routing
If this is your first time, click Enable Email Routing. Cloudflare will automatically add the required MX and TXT DNS records. -
Create Custom Address
- Navigate to the Routes tab and click Create address.
- Custom address: enter the prefix you want (e.g.,
infoorez). - Action: ensure Send to an email is selected.
- Destination: enter your personal Gmail address (e.g.,
your‑name@gmail.com). - Click Save.
-
Verify the Forwarding Rule
Cloudflare sends a verification email to the destination address. Open the email in Gmail and click the verification link to activate the rule.
Part 2: Configuring the Sending Mask (Gmail SMTP via App Password)
Prerequisites
- Enable 2‑Step Verification (2FA) on your Google Account. This is required to generate an App Password.
Generate an App Password
- Go to Google Account > Security.
- In the search box type “App passwords” and select the result.
- Click Create a new app password, give it a name like “Cloudflare SMTP”, and click Create.
- Copy the 16‑character password immediately; it will not be shown again.
Gmail Configuration
-
Open Gmail → Settings (gear icon) → See all settings.
-
Go to the Accounts and Import tab.
-
In the Send mail as section, click Add another email address.
-
Enter your desired name and the custom address (
info@example.com). -
Configure the SMTP settings:
SMTP Server: smtp.gmail.com Port: 587 Username: your-name@gmail.com Password: <your‑app‑password> Security: TLS -
Click Add Account. Gmail will send a confirmation email to
info@example.com. Thanks to the Cloudflare forwarding set up in Part 1, this email lands in your Gmail inbox. Open it and click the confirmation link.
Finalizing Your Setup
-
Reply behavior: In Settings > Accounts and Import, enable “Reply from the same address the message was sent to.” You can also set a default sending address here.
-
Update SPF record: To improve deliverability, add or update the SPF TXT record in Cloudflare DNS to include Google’s mail servers:
v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~allOnce the SPF record propagates, you’ll be able to select
info@example.comfrom the From dropdown when composing new emails.
Congratulations! You now have a professional‑looking email address that costs only the price of your domain name.