# Custom Domain Email → Gmail Setup
> [!info] Key idea
> **Registrar** (Network Solutions, register.com) = where the domain is rented.
> **DNS provider** (Cloudflare, Vercel, or the registrar) = where records say where the website and email go.
> You can move DNS to Cloudflare **without** transferring the domain registration.
---
## Setting Up a Cloudflare Account
- [ ] Go to `dash.cloudflare.com/sign-up`
- [ ] Sign up with an email and password (or a Google/Apple sign-in)
- [ ] Click the verification link Cloudflare emails you
- [ ] Turn on **two-factor authentication** (profile icon → **My Profile** → **Authentication**); this account will control your domains' DNS, so it's worth protecting
- [ ] When asked to choose a plan for a domain, pick **Free**
- [ ] To add a domain to the account, follow **Moving DNS to Cloudflare** below
> [!info] One account, many domains
> All your domains (Network Solutions, register.com, Vercel) can live in the same Cloudflare account. The domain already on Cloudflare stays where it is.
---
## Domain 1: Already on Cloudflare
- [ ] In the Cloudflare dashboard, go to **Compute → Email Service → Email Routing**
- [ ] Click **Onboard Domain**, choose the domain, and let Cloudflare add the MX and SPF records
> [!warning] Use Email Routing, not Email Sending
> The **Email Sending** page has its own Onboard Domain button. That's Cloudflare's paid sending service; skip it, since Brevo handles sending.
- [ ] Go to **Email Routing → Destination Addresses** and add Gmail
- [ ] Click the verification link Cloudflare sends to Gmail
- [ ] Select the domain → **Routing Rules** tab → create a rule (e.g. `
[email protected]` → Gmail)
- [ ] *(Optional)* Turn on **catch-all** so any address forwards
- [ ] Send a test email from another account and confirm it arrives
---
## Domain 2: On Vercel
Choose one path:
### Option A: Keep DNS at Vercel (use ImprovMX)
- [ ] Create a free **ImprovMX** account and add the domain
- [ ] In Vercel DNS settings, add ImprovMX's two **MX records**
- [ ] Add ImprovMX's **SPF TXT record**
- [ ] Set up a forwarding alias to Gmail
- [ ] Send a test email and confirm it arrives
### Option B: Move DNS to Cloudflare
- [ ] Follow **Moving DNS to Cloudflare** below
- [ ] Then follow the **Domain 1** steps above
---
## Sending as Your Domain from Gmail (all domains)
### Brevo (SMTP)
- [ ] Create a free **Brevo** account (signing up with Gmail is fine; it's only the account login)
- [ ] Complete any Brevo account activation/profile steps (SMTP may not work until this is done)
- [ ] Add each domain under **Senders & Domains**
- [ ] Add the custom address (e.g. `
[email protected]`) as a **sender**, not Gmail
- [ ] Add Brevo's DKIM and verification records in that domain's DNS provider
- [ ] Confirm the domain shows as authenticated in Brevo
- [ ] Go to account name (top right) → **SMTP & API → SMTP** tab
- [ ] Copy the **Login** shown there (looks like `
[email protected]`)
- [ ] Generate an **SMTP key** (starts with `xsmtpsib-`) and copy it right away; it's only shown once
### Gmail
- [ ] Gmail → **Settings → See all settings → Accounts and Import**
- [ ] **Send mail as → Add another email address**
- [ ] Enter name and custom address (uncheck "Treat as an alias" if desired)
- [ ] SMTP server: `smtp-relay.brevo.com`
- [ ] Port: `587`
- [ ] Username: the Brevo **SMTP Login** (not the word "Brevo" or your account email)
- [ ] Password: the Brevo **SMTP key**
- [ ] Select **Secured connection using TLS**
- [ ] Enter the confirmation code Gmail sends to the custom address
> [!tip] If authentication fails
> - Username must be the SMTP **Login** from Brevo's SMTP tab
> - Key must start with `xsmtpsib-` (an `xkeysib-` key is an API key and won't work)
> - Check for a trailing space after pasting the key
> - Generate a fresh SMTP key if unsure what was copied
> - Look for a Brevo banner or email about finishing account activation
- [ ] *(Optional)* Set Gmail to reply from the address the message was sent to
- [ ] Send a test email and check the From address
---
## Moving DNS to Cloudflare (per domain)
- [ ] **Record every existing DNS record** (A, CNAME, MX, TXT) from Network Solutions / register.com / Vercel
- [ ] Add the domain to Cloudflare (free plan)
- [ ] Compare Cloudflare's imported records against your list; add any missing (especially subdomains)
- [ ] Check for existing email on the domain; old mailboxes stop receiving once MX changes
- [ ] **Turn off DNSSEC** at the registrar if enabled
- [ ] Change nameservers at the registrar to the two Cloudflare provides
- [ ] Wait for the change to take effect (usually under an hour, up to a day)
- [ ] Confirm the website still loads
> [!warning] Vercel sites
> Set DNS records pointing to Vercel to **gray cloud (DNS only)**, not orange (proxied). Proxying can cause redirect loops and SSL errors.
---
## register.com Domain
- [ ] Point nameservers to Cloudflare (same steps as **Moving DNS to Cloudflare**)
- [ ] Set up Email Routing (**Domain 1** steps)
- [ ] *(Optional, later)* Transfer registration to **Cloudflare Registrar** for at-cost renewals