DEV Community

Cover image for Set Up Free Custom Domain Email Using CloudFlare
A Muh Mufqi Zuhudi
A Muh Mufqi Zuhudi

Posted on • Edited on

Set Up Free Custom Domain Email Using CloudFlare

Setting up a free custom email for your own domain is easier than you think. You don’t need to pay for expensive email hosting to get a professional-looking email address. Using Cloudflare’s email forwarding feature, you can have a custom domain email that forwards to your personal inbox without extra costs or complications.

In this post, I’ll show you how to forward emails from your custom domain to your personal inbox, like Gmail, Yahoo Mail, etc. I’ll also cover how to send emails using your custom domain through popular email providers.

Set Up a Custom Email for Forwarding on Cloudflare

Cloudflare allows you to forward incoming emails from your custom domain email address to your personal email account from an email service provider (ESP) such as Gmail, Yahoo Mail, etc. If your domain is not currently managed by Cloudflare, you can migrate your nameservers (NS) to Cloudflare to enable these features.

Follow these steps to activate email forwarding from your custom domain email address to your personal email account in Cloudflare:

  1. Visit https://dash.cloudflare.com.
  2. At Account home, click your domain (for example: yourdomain.com).
  3. Navigate to Email > Email Routing.
  4. At Email Routing, click Get started and add your forwarding details in the table below:

    Custom address Action Destination
    me@yourdomain.com Send to an email me@email.com

    note: me@yourdomain.com is your desired custom domain email address, and me@email.com is your personal email account from ESP.

  5. Click Create and continue.

  6. Confirm by clicking Continue.

  7. At Configure your DNS, add the missing DNS records by clicking Add records and enable:

    Record type Hostname Priority Value Status
    MX yourdomain.com 43 route1.mx.cloudflare.net.
    MX yourdomain.com 58 route2.mx.cloudflare.net.
    MX yourdomain.com 89 route3.mx.cloudflare.net.
    TXT cf2024-1._domainkey.yourdomain.com "v=DKIM1; h=sha256; k=rsa; p=XXX/xxx"
    TXT yourdomain.com "v=spf1 include:_spf.mx.cloudflare.net ~all"

    Note: This table is an example of the DNS records you’ll see. Some values will be unique to your setup.

  8. Finally, wait until the Routing status shows as Enabled.

Once completed, emails sent to your custom domain address will be forwarded automatically to your personal email account.

Set Up a Custom Email for Sending on Yahoo Mail

Follow these steps to send emails using your custom domain email address in Yahoo Mail:

  1. Visit https://mail.yahoo.com.
  2. Navigate to Settings > More Settings.
  3. At Settings menu, click on Mailboxes.
  4. Click Add button at the bottom of the Mailbox Management options.
  5. Enter your custom email address (for example: me@yourdomain.com) and click Next.
  6. Click Verify to setup your email.
  7. Check your inbox for a new email with the subject: Please verify your email address.
  8. Open the email and click the verification link labeled click here to confirm.

After completing these steps, you will be able to send emails using your custom email address through Yahoo Mail.

Set Up a Custom Email for Sending on Gmail

Before you begin, make sure that 2-Step Verification is enabled on your Google Account, as it is required to generate an App Password for SMTP authentication.

Follow these steps to send emails using your custom domain email address in Gmail:

  1. Visit https://myaccount.google.com/security.
  2. Under How you sign in to Google, click 2-Step Verification and enable it if it's not already active.
  3. Search for App passwords in the search bar of your Google Account settings.
  4. Create a new App Password with any name (for example: Custom Domain SMTP) and copy the generated 16-character password.
  5. Visit https://mail.google.com.
  6. Click the Settings (gear icon) in the top right, then click See all settings.
  7. Navigate to the Accounts and Import tab.
  8. In the Send mail as section, click Add another email address.
  9. Enter your name and your custom email address (for example: me@yourdomain.com), then click Next Step.
  10. Fill in the SMTP settings as follows:

    Field Value
    SMTP Server smtp.gmail.com
    Port 587
    Username me@gmail.com
    Password Your 16-character App Password
    Security TLS

    Note: me@gmail.com is your personal Gmail address, and the App Password is the one generated in step 4, not your regular Gmail password.

  11. Click Add Account.

  12. Check your inbox for a verification email from Gmail and click the confirmation link to complete the setup.

Once verified, your custom email address will appear as a selectable sender when composing new emails in Gmail.

References

[1] "Easily creating and routing email addresses with Cloudflare Email Routing," Cloudflare Blog, Sep. 26, 2021. [Online]. Available: https://blog.cloudflare.com/introducing-email-routing.
[2] "Add, delete, or edit a Send-only address in Yahoo Mail," Yahoo Help. [Online]. Available: https://help.yahoo.com/kb/add-delete-edit-send-only-address-yahoo-mail-sln28342.html.
[3] "Send emails from a different address or alias," Google Help. [Online]. Available: https://support.google.com/mail/answer/22370.
[4] "Sign in with App Passwords," Google Account Help. [Online]. Available: https://support.google.com/accounts/answer/185833.

Top comments (0)