Home FAQ New Contact Mock Test About

Send and receive email on your own domain

Receive mail at hello@yourdomain.com with Cloudflare Email Routing, and send from the same address inside Gmail using a Google app password. Free, about 15 minutes.

How the three parts fit together

Cloudflare only receives and forwards. Gmail does the sending. You need a domain on Cloudflare and a Gmail account.

Receive

Cloudflare Email Routing forwards hello@yourdomain.com to your Gmail inbox.

App password

A 16 character Google code that lets Gmail send through its own SMTP server.

Send as

Gmail's Send mail as feature, so replies leave from hello@yourdomain.com.

Receive mail with Cloudflare

Replace yourdomain.com and yourname@gmail.com with your own values everywhere.

1

Open Email Routing

  1. Sign in at dash.cloudflare.com and select your domain.
  2. In the left menu open Email, then Email Routing, and press Get started.
The domain must already use Cloudflare nameservers. If it does not, add the site first and change the nameservers at your registrar.
2

Create your custom address

  1. Under Routes, press Create address.
  2. Custom address: hello (this becomes hello@yourdomain.com).
  3. Action: Send to an email. Destination: your Gmail address.
  4. Save. Cloudflare emails a verification link to that Gmail. Open it and confirm.
hello@yourdomain.com → yourname@gmail.com
3

Add the DNS records Cloudflare asks for

Cloudflare shows a prompt to add the MX and SPF records. Press Add records and enable. If it reports a conflict, delete the old MX records of your previous mail provider first, then retry.

  • Three MX records pointing to Cloudflare's mail servers (route1, route2, route3 under mx.cloudflare.net).
  • One SPF TXT record that includes Cloudflare.
Only one SPF record may exist per domain. If you already have one, merge the includes into it instead of adding a second record.
4

Test receiving

From any other account (not the Gmail you forward to) send a mail to hello@yourdomain.com. It should arrive in your Gmail inbox within a minute. Optionally turn on the Catch-all address under Routes to forward every other name at your domain too.

Create a Google app password

Gmail needs this code to send through smtp.gmail.com. Your normal Google password will not work there.

5

Turn on 2-Step Verification

  1. Open myaccount.google.com/security.
  2. Under How you sign in to Google, open 2-Step Verification and finish setup if it is off.

App passwords stay hidden until this is on.

6

Generate the app password

  1. Open myaccount.google.com/apppasswords.
  2. App name: Gmail custom mail. Press Create.
  3. Copy the 16 character code now. Google shows it only once. Spaces do not matter.
Treat it like a password. Never paste it into a public repo or chat. If the page is missing, your account may be on Advanced Protection or managed by a Workspace admin who disabled app passwords.

Send from Gmail

Use Gmail's Send mail as so your replies show hello@yourdomain.com.

7

Open Send mail as

  1. In Gmail on a computer press the gear, then See all settings.
  2. Open the Accounts and Import tab.
  3. Under Send mail as press Add another email address.
8

Enter your name, address and SMTP details

  1. Name: your display name. Email address: hello@yourdomain.com.
  2. Keep Treat as an alias ticked, then press Next Step.
  3. Fill the SMTP screen with the values below and press Add Account.
FieldValue
SMTP Serversmtp.gmail.com
Port587
Secured connectionTLS (the default choice)
Usernameyour full Gmail address, yourname@gmail.com, not the custom one
Passwordthe 16 character app password from step 6
smtp.gmail.com
9

Confirm with the verification code

Google sends a confirmation mail to hello@yourdomain.com. Cloudflare forwards it to your Gmail inbox, so it arrives within a minute. Click the link in it or type the code into the Gmail window.

No mail after two minutes? Check Spam, and confirm step 2 shows the destination as verified. Receiving must work before this step can.
10

Reply from the right address

  1. Back in Send mail as, choose Reply from the same address the message was sent to.
  2. Optional: press make default next to hello@yourdomain.com so new mail uses it.
  3. To send, press Compose and pick the address in the From dropdown.

Send a test to another account and check that the sender shows your custom address.

DNS records for better delivery

Add these in Cloudflare under DNS, then Records. They lower the chance of your mail landing in spam.

TypeNameContent
MX@Three Cloudflare records, added automatically in step 3
TXT (SPF)@v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all
TXT (DMARC)_dmarcv=DMARC1; p=none; rua=mailto:hello@yourdomain.com
v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all
Mail sent through a personal Gmail account is signed by Google, not by your domain, so some strict receivers may still mark it as spam. Start DMARC at p=none, test with a few providers, and move to a paid mail host later if you send in volume.

Common questions

Can Cloudflare Email Routing send mail?

No. It only receives and forwards. That is why sending goes through Gmail's SMTP server with an app password.

Why does Gmail say authentication failed?

Check that the username is your full Gmail address, the password is the app password and not your Google password, and the port is 587 with TLS. Create a fresh app password if unsure.

Is it free?

Cloudflare Email Routing and Gmail are free. You only pay for the domain name.

Can I add more addresses like support@ or admin@?

Yes. Add another custom address in Email Routing, then repeat Part 3 for each one you want to send from.

Does this work on the Gmail phone app?

Setup must be done on a computer, but once added, the From option appears in the app's compose screen.