All notes

How to add email to a domain you already use

Set up email for an existing website domain with Cloudflare forwarding, a Gmail mailbox, and Resend SMTP.

  • Cloudflare Email Routing forwards incoming mail from the domain.
  • A Gmail account acts as the mailbox where you read, organize, and reply to messages.
  • Resend provides authenticated SMTP for sending from the root domain.
  • Different people can use separate forwarding destinations and SMTP keys while sharing the same free-tier limits.
  • The setup is free for light use after the cost of the domain.
On this page

You have a website at example.com. Now you want people to reach you at [email protected], but owning the domain did not give you an inbox or a way to send mail from that address.

That is normal. A domain can point to a working website without having email configured. This guide adds email to a domain you already use without moving the website or adding a recurring mailbox fee.

Three services have separate jobs:

  • Cloudflare forwards incoming mail from the domain.
  • A Gmail account is the mailbox where the messages are stored. A separate free Gmail account is a good choice. It does not have to be your main account.
  • Resend provides SMTP for sending from the domain.

The domain itself still costs money. After that, Cloudflare Email Routing, Gmail, and Resend can cover light use on their free tiers:

ServiceJob
Cloudflare Email RoutingForward incoming mail from the domain
GmailAct as the mailbox
ResendProvide authenticated SMTP for outgoing mail

The finished setup provides one inbox, several addresses on the domain, and replies that come from the address that received the message. Your website continues to work where it is already hosted.

What you need

  • a domain you already use for a website, service, or project
  • the domain's DNS hosted by Cloudflare
  • a free Gmail account to use as the mailbox, preferably one dedicated to the domain
  • a free Resend account

If Cloudflare does not manage the domain's DNS yet, move the DNS to Cloudflare first and make sure the existing website records are present. The website can remain with its current host.

The main guide starts with one mailbox. A later section shows how to forward different addresses to different people while keeping the same basic design.

The architecture

TEXT
Incoming mail
 
Internet
   |
   v
Cloudflare Email Routing
   |
   v
Gmail mailbox
   |
   `-- Gmail on the web
 
Outgoing mail
 
Gmail
   |
   v
Resend SMTP
   |
   v
Recipient

The three services work together, but none of them does the whole job. Cloudflare forwards incoming messages. Gmail stores the messages and provides the inbox. Resend supplies the SMTP server that sends messages from the domain.

1. Route incoming mail through Cloudflare

Open Cloudflare's Email Routing page for the domain and enable routing. Cloudflare will show the MX and TXT records it needs. Add the records if they are not added automatically.

Next, add the Gmail account that will act as the mailbox. Cloudflare sends a verification message to that Gmail inbox. Open it and confirm the address before creating routing rules.

Create one rule for each address you want to receive:

TEXT
[email protected]   --+
[email protected] --+--> <dedicated Gmail account>
[email protected]   --+

The Gmail account does not have to be your main personal account. A dedicated account keeps the domain's mail, filters, contacts, signatures, and account recovery separate. It also limits what is exposed if the forwarding address ever appears in an automated message.

Cloudflare Email Routing is available on its free plan. It adds the MX and TXT records needed for routing, and each rule maps an address on the domain to a verified destination.

2. Verify the root domain in Resend

Resend's free tier gives you up to three verified custom domains. For this setup, verify the root domain so one domain entry can handle every address you need:

TEXT
example.com

Verifying example.com lets you send from [email protected], [email protected], [email protected], and any other address at the root domain. Verifying mail.example.com instead would cover only addresses on that subdomain. It uses one of the three domain slots and does not cover addresses at example.com.

Add the SPF and DKIM records Resend provides to Cloudflare DNS. Resend uses a send subdomain for its default return path. That is part of the root domain's DNS configuration and does not consume another custom-domain slot.

Wait for Resend to mark the domain as verified before continuing.

3. Create the Resend SMTP credential

Forwarding handles incoming mail. Resend SMTP handles messages sent from your domain.

Create an API key in Resend. Store it in your password manager, then use these settings when Gmail asks for an SMTP server:

TEXT
Server:   smtp.resend.com
Port:     465
Security: SSL/TLS
Username: resend
Password: <Resend API key>

Port 587 with STARTTLS is also supported. Use an encrypted connection and keep the API key out of notes and screenshots.

Resend's free transactional plan currently allows 3,000 emails each month, with a daily cap of 100. Sent and received emails count against both limits, and each recipient in the To, CC, or BCC fields counts separately. That is enough for light correspondence and early application email. It is not enough for bulk mail or a busy support queue.

Once a domain is verified, Resend allows mail from any address at that domain. That means me@, hello@, support@, and notify@ do not each need a separate Resend sender record.

4. Add each domain address to Gmail

In Gmail, open Settings, then Accounts and Import. Under Send mail as, add every domain address you plan to use. Enter the Resend SMTP settings for each address.

Gmail sends a confirmation message to the address you add. Cloudflare forwards that message to the same Gmail inbox, where you can open the confirmation link.

Select Reply from the same address the message was sent to. When a message arrives at [email protected], Gmail can then choose [email protected] for the reply.

Check the From field before sending, especially in a mobile client. Google notes that the underlying Gmail address can appear in some edge cases, including out-of-office replies, filter-generated responses, and mailbox failure notices. This setup keeps the Gmail address out of normal mail, but it is not an anonymity system.

5. Add DMARC and test the complete path

SPF and DKIM authorize Resend to send for the domain. Add a DMARC policy too, starting in monitoring mode if necessary. These records do not guarantee inbox placement, but they let receiving systems check whether a message is authentic.

Test the finished setup in both directions:

  1. Send a message from an outside account to every public address.
  2. Confirm that each message reaches the dedicated Gmail inbox.
  3. Reply and inspect the From address.
  4. Check the message headers for SPF, DKIM, and DMARC results.

Do not use this setup for marketing mail. A free transactional account is not a newsletter service, and deliverability depends on more than valid DNS records.

Using the setup with more than one person

The same domain can support several people without sending every address to one Gmail inbox.

For each person:

  1. Add and verify their Gmail account as a Cloudflare destination.
  2. Create a Cloudflare rule that forwards their domain address to their Gmail account.
  3. Add that domain address to their Gmail account under Send mail as.
  4. Create a separate Resend API key with Sending access, restrict it to the verified domain, and use it as that person's SMTP password.

The routing can look like this:

TEXT
[email protected]  --> Alex's Gmail account
[email protected] --> Jamie's Gmail account

Separate Resend keys make it possible to revoke one person's SMTP access without changing everyone else's password. Resend also lets you filter logs by API key. A domain-restricted key can still send from any address on that domain, so the key is a separate credential, not a rule that enforces one From address.

Everyone on the Resend account shares the same free-tier allowance. Messages sent with any of the keys count toward the account's combined limit of 100 per day and 3,000 per month. The keys also share the account's rate limit. Adding more keys does not create more free capacity.

Free-tier limits and tradeoffs

The basic architecture provides:

  • several addresses on the domain
  • one dedicated inbox
  • normal replies from the address that received the message
  • authenticated SMTP
  • a transactional email API for password resets and notifications
  • little or no monthly cost at low volume

With one destination, the addresses are aliases feeding one mailbox. With several destinations, each person can receive mail in a different Gmail inbox. The design does not provide a shared inbox or central user administration. Resend's free sending limits apply across everyone, and the underlying Gmail address can still appear in some automated responses.

For light use, the result is a working inbox and authenticated sending for a domain you already own, without a recurring mailbox fee.

References