ALL ARTICLES
Business EmailCloudflareGmailAI Agents

Free Custom Business Email in Gmail: The Cloudflare Method, Step by Step (Plus an AI Agent Prompt That Does It for You)

Send and receive email as you@yourdomain.com inside a free Gmail account, using Cloudflare Email Routing and Gmail "Send mail as". Credit to Ali Solanki for the method; this is every step written out, plus a copy-paste prompt that lets an AI agent do the whole setup for you.

BY Mudasir Hussain11 min read

An address like hello@yourbrand.com makes a one-person product look like a company. The usual way to get one is Google Workspace or Microsoft 365, which charge per address, every month, forever.

There is a free way. Your domain's mail goes through Cloudflare, Cloudflare forwards it to the Gmail account you already have, and Gmail sends replies as your custom address. You get as many addresses as you want, all in one inbox, for $0 a month.

Credit: This Method Is Ali Solanki's

I did not come up with this. [Ali Solanki](https://www.youtube.com/channel/UCgzz4Kd1YpzxJOkrhf5U_7A) walks through the whole thing in his video, and he also wrote it up on his newsletter: How to get $0 Custom Business Emails?!. Watch the video first if you like seeing the screens. Everything below is his process turned into a checklist, with a few extra notes I added where people tend to get stuck.

$0 Business Email - Why No One Talks About It?! — Ali Solanki on YouTube

If this helps you, go subscribe to his channel. He did the hard part.

What You Need Before You Start

  • A domain. Any registrar works: GoDaddy, Namecheap, Cloudflare, Porkbun. A .com costs about $10 a year.
  • A Gmail account. This is where every email ends up. A fresh one just for the business keeps things tidy.
  • 2-Step Verification turned on for that Gmail account. Without it, Google won't let you create an App Password, and you need one in Step 5.
  • About 30 minutes, most of it waiting for DNS changes to spread.

The whole setup is five steps: buy the domain, move it to Cloudflare, receive mail, send mail, then add a profile picture. Don't skip any of them. As Ali says in the video, missing a single step is the most common reason mail doesn't arrive or doesn't send.

Step 1: Buy Your Domain

  1. Go to any registrar and search for the name you want.
  2. Buy it. You don't need any email or hosting add-ons. Turn them all off at checkout.
  3. Stay logged in to the registrar. You'll need it again in Step 2.

If you already own the domain, skip ahead.

Step 2: Connect the Domain to Cloudflare

Cloudflare's free plan has a feature called Email Routing, and it only works when Cloudflare runs your domain's DNS. So the domain has to move to Cloudflare first. The registration stays where it is; only the DNS moves.

  1. Create a free account at cloudflare.com and log in.
  2. Click Add, then Connect a domain.
  3. Type the bare domain, like yourbrand.com. No https://, no www.
  4. Leave Quick scan for DNS records on the recommended setting. Choose whatever you want for the AI-bot options; they don't affect email. Click Continue.
  5. Pick the Free plan. You never need a paid plan for this.
  6. Review the DNS records Cloudflare copied over, then click Continue to activation.
  7. Cloudflare shows you two nameservers, something like xxx.ns.cloudflare.com. Your pair is assigned to you, so copy your own, not someone else's from a tutorial.
  8. At your registrar, open the domain's DNS / Nameservers setting, switch it to custom nameservers, and paste in both Cloudflare nameservers.
  9. Back in Cloudflare, click I updated my nameservers.
  10. Wait for the "your domain is now protected by Cloudflare" message. Ali's took a few minutes. It can take an hour or more.

Keep Your Website Online

If a website already runs on this domain, check it now. Cloudflare usually copies your records correctly, but its proxy (the orange cloud) can break sites hosted on platforms like Vercel or Netlify.

  1. In Cloudflare go to DNS → Records.
  2. Find the record that points your site somewhere: the www CNAME and the A or CNAME record for the bare domain.
  3. If the site is down, set those records to DNS only (grey cloud). The only thing you lose is Cloudflare's own analytics for the site.

Step 3: Receive Email at Your Domain

  1. In Cloudflare open your domain, then go to Email → Email Routing.
  2. Add your Gmail address as a Destination address.
  3. Open that Gmail inbox, find Cloudflare's verification email, and click Verify email address. The destination should change from *Pending* to *Verified*.
  4. Turn on Catch-all (optional, recommended). Under Routing rules, edit Catch-all, set the action to *Send to an email* with your Gmail as the destination, save it, and switch it on. Now mail sent to *any* address at your domain still reaches you, typos included. If someone writes to aly@yourbrand.com instead of ali@yourbrand.com, you still get it and they never see a bounce.
  5. Create your addresses. Click Create address, enter the custom address (hello, support, you), set the destination to your Gmail, and save. Repeat for each one. Each address shows as *Active*.
  6. Enable Email Routing. Cloudflare asks to add the DNS records it needs (MX records and an SPF TXT record). Click Add records and enable. It writes them for you.
  7. Test it. From a *different* email account, send a message to one of your new addresses. It should land in your Gmail within a minute.

That's receiving done, and none of it touched Gmail settings.

Step 4: Get a Google App Password

Gmail needs a special password to send mail as your domain. A normal Google password won't work here.

  1. Make sure 2-Step Verification is on: Google Account → Security → 2-Step Verification. If you can't find the App Passwords page in the next step, this is almost always why.
  2. Open Google Account and search for App passwords.
  3. Give it a name, like Gmail send-as, and click Create.
  4. Copy the 16-character password before clicking Done. Google never shows it again.
  5. Treat it like your real password. Anyone who has it can use your account.

Step 5: Send Email as Your Domain from Gmail

  1. In Gmail, open Settings (gear) → See all settings → Accounts and Import.
  2. Under Send mail as, click Add another email address. If nothing opens, your browser blocked the pop-up. Allow pop-ups for Gmail and try again.
  3. Enter the display name (for example, Ali from Watermelon Gang) and your custom address, not the Gmail one. Leave Treat as an alias ticked. Click Next Step.
  4. Fill in the SMTP settings. SMTP Server: smtp.gmail.com. Port: 587 with TLS (or 465 with SSL). Username: your full Gmail address. Password: the App Password from Step 4, with the spaces removed.
  5. Click Add Account. Gmail sends a confirmation email to your custom address. Thanks to Step 3, it arrives in this same inbox.
  6. Click the confirmation link in that email.
  7. Refresh Gmail and click Compose. The From field now has a dropdown with your custom address. Send a test to another account and check that it arrives from the right address.
  8. Optional: back in Accounts and Import, set When replying to a message to *Reply from the same address the message was sent to*. Replies then go out from whichever address the customer emailed.

Repeat steps 2 to 6 for each address you want to send from. They can all reuse the same App Password.

Step 6: Give Your Address a Profile Picture

Out of the box, your custom address shows a blank grey letter in people's inboxes, and that looks like spam. The fix is to create a Google account *for the custom address itself* (not a Gmail account) and give it a photo.

  1. Open Google's sign-up flow from this link: accounts.google.com/signup/v2/webcreateaccount. The normal "Create account" button often only offers new @gmail.com addresses. This link is the one Ali shares.
  2. Enter the name, birthday and gender.
  3. When it asks for a username, choose Use your existing email and type your custom address.
  4. Google emails a code to that address, which forwards to your Gmail. Enter the code.
  5. Set a password. If asked, scan the QR code with your phone to verify.
  6. Once you're in, click the avatar and upload your profile picture or logo.

Mail from that address now shows your photo to recipients who use Gmail, which is most of them. Repeat for each address that needs a face.

Keeping Your Emails Out of Spam

The video shows a test landing in the inbox and even getting marked important. Ali points out that this is because his domain is already warmed up. A brand-new domain doesn't have a sending reputation yet, so a few things matter:

  • Keep DMARC relaxed. With this setup Gmail signs your mail as gmail.com, not as your domain. If your domain has a DMARC record set to p=quarantine or p=reject, receivers may junk or bounce your mail. Use v=DMARC1; p=none; (a TXT record at _dmarc.yourbrand.com), or delete any stricter record. This is the usual cause when people say "receiving works but my replies vanish".
  • Add Google to your SPF record. Cloudflare creates an SPF record like v=spf1 include:_spf.mx.cloudflare.net ~all. Edit that same record (don't add a second SPF record) to v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all.
  • Warm up slowly. Start with real one-to-one emails to people who will reply. Don't send a cold-email blast from a domain that's a day old.
  • Know where this stops. This is great for a founder, a freelancer or a small team answering customers. It isn't built for bulk or marketing email. For newsletters, use a proper sending service on its own subdomain.

Cloudflare's free Email Routing also caps how many custom addresses and destinations you can create (around 200 of each at the time of writing). With catch-all on, you'll never hit it.

The Shortcut: Let an AI Agent Do All of It

Every step above is clicking through dashboards, which is exactly what modern AI agents are good at. If you use an agent that can drive a browser (Claude with Chrome, Claude Code, or any computer-use agent), copy the prompt below and replace everything in {{DOUBLE_BRACES}} with your own details. The agent does the whole setup end to end and only stops for the things a human really has to do, like paying, logging in, 2FA codes and phone QR scans.

Fill in the YOUR DETAILS block at the top. Leave a field as none if it doesn't apply.

prompt
You are an autonomous setup agent. Your job: give my business free custom-domain email that I can RECEIVE and SEND from inside my existing Gmail account, using Cloudflare Email Routing + Gmail "Send mail as" + a Google account for each address's profile picture. Do the ENTIRE job in one run. Work independently. Only stop to ask me for something when it is truly impossible for you to do yourself (payment, a password you do not have, a 2FA code, a phone QR scan, a CAPTCHA you cannot pass). When you must ask, ask for everything you need in ONE message, then continue.

==================== YOUR DETAILS (filled in by me) ====================
BUSINESS / PRODUCT NAME: {{BUSINESS_NAME}}
DOMAIN: {{DOMAIN}}                                  (e.g. mybrand.com — no https, no www)
DO I ALREADY OWN THE DOMAIN?: {{YES_OR_NO}}
  If NO — preferred registrar: {{REGISTRAR}}       (e.g. Cloudflare Registrar, Namecheap, Porkbun) and max budget per year: {{MAX_PRICE_USD}}
CURRENT REGISTRAR (if already owned): {{CURRENT_REGISTRAR}}
GMAIL INBOX THAT RECEIVES EVERYTHING: {{GMAIL_ADDRESS}}
ADDRESSES TO CREATE (local part | display name | needs send-as? | needs profile picture?):
  - {{ADDRESS_1}} | {{DISPLAY_NAME_1}} | yes | yes      (e.g. hello | Mybrand Team | yes | yes)
  - {{ADDRESS_2}} | {{DISPLAY_NAME_2}} | yes | no       (e.g. support | Mybrand Support | yes | no)
  - {{ADDRESS_3}} | {{DISPLAY_NAME_3}} | no  | no       (add or delete lines as needed)
ENABLE CATCH-ALL (forward any unknown address to Gmail)?: {{YES_OR_NO}}
PROFILE PICTURE FILE (local path or URL): {{PROFILE_PICTURE_PATH_OR_URL}}
DOES A WEBSITE ALREADY RUN ON THIS DOMAIN?: {{YES_OR_NO}}   Hosted on: {{HOST, e.g. Vercel / Netlify / WordPress / none}}
TEST RECIPIENT (a different inbox I can check): {{TEST_EMAIL}}
OPTIONAL API ACCESS (leave "none" to use the browser instead):
  CLOUDFLARE_API_TOKEN: {{CLOUDFLARE_API_TOKEN_OR_NONE}}
  CLOUDFLARE_ACCOUNT_ID: {{CLOUDFLARE_ACCOUNT_ID_OR_NONE}}
  REGISTRAR API KEY / USER: {{REGISTRAR_API_OR_NONE}}
=========================================================================

HOW TO WORK
1. Tools, in order of preference: (a) an official API if I gave you a token, (b) the Chrome/browser tool, using sessions I am already logged into, (c) asking me. Check what tools you have before you start. If a browser is available, open each site and see whether I am already signed in before you ask me for anything.
2. Before starting, make a checklist of Phases 0–8 below and keep it updated. After each phase, verify the result (read it back from the dashboard or API) before moving on. Never assume a click worked.
3. Never invent values. Read nameservers, record values and verification states from the actual screen or API response.
4. Never delete or change existing DNS records except where a phase below says to. Take a note of every record before you change anything so it can be restored.
5. Secrets (App Password, API tokens, passwords): use them only where needed, never print them in full in your final report, and never paste them anywhere except the exact field that needs them.
6. If a page layout differs from these instructions (dashboards change), find the equivalent setting by its name. Do not give up because a button moved.
7. Waiting: DNS and nameserver changes can take 5–60+ minutes. While you wait, do other phases that do not depend on it (e.g. Phase 4, the App Password), then come back and re-check every few minutes. Do not ask me to wait. Keep working.

PHASE 0 — PREFLIGHT
- Confirm every {{PLACEHOLDER}} above is filled. If a required one is missing, ask for all missing ones at once.
- Check whether 2-Step Verification is on for {{GMAIL_ADDRESS}} (Google Account → Security). If it is off, turn it on. It needs my phone, so ask me only for the code or prompt it requires.

PHASE 1 — DOMAIN
- If I already own {{DOMAIN}}, skip to Phase 2.
- Otherwise check availability at {{REGISTRAR}}. If the price is within {{MAX_PRICE_USD}}, add it to the cart with every add-on (email, hosting, privacy upsells that cost money) turned OFF. Free WHOIS privacy should stay ON. STOP and ask me to approve and complete the payment. Never enter card details yourself. Continue once I confirm.

PHASE 2 — MOVE DNS TO CLOUDFLARE (free plan)
- API route: create the zone ({"name":"{{DOMAIN}}","account":{"id":"<account id>"},"type":"full"}) and read the assigned name_servers from the response.
- Browser route: dash.cloudflare.com → Add → Connect a domain → enter {{DOMAIN}} exactly → Quick scan for DNS records (recommended) → Continue → choose the FREE plan → review records → Continue to activation → copy the TWO nameservers shown to me.
- Before switching nameservers, compare the records Cloudflare imported with the records at the current registrar. Add any missing ones (especially website A/CNAME records and any existing MX/TXT records) so nothing breaks.
- At the registrar, replace the nameservers with exactly the two Cloudflare ones (via API if available, otherwise in the browser: Domain → DNS / Nameservers → Custom).
- In Cloudflare click "I updated my nameservers" / trigger a re-check. Poll until the zone status is Active.
- WEBSITE SAFETY: if a website runs on this domain and is hosted on a platform such as Vercel/Netlify, set its A/CNAME records (apex and www) to "DNS only" (grey cloud). Then load https://{{DOMAIN}} and https://www.{{DOMAIN}} to confirm the site still works.

PHASE 3 — RECEIVE MAIL (Cloudflare Email Routing)
- Add {{GMAIL_ADDRESS}} as a destination address (API: POST /accounts/{account_id}/email/routing/addresses). Cloudflare emails a verification link to Gmail. Open Gmail in the browser, find the Cloudflare verification email, and click "Verify email address". Confirm the destination shows Verified.
- For each address in my list, create a routing rule: custom address <local part>@{{DOMAIN}} → action "Send to an email" → {{GMAIL_ADDRESS}} (API: POST /zones/{zone_id}/email/routing/rules with a literal "to" matcher and a "forward" action). Confirm each shows Active.
- If catch-all = yes: set the Catch-all rule to forward to {{GMAIL_ADDRESS}} and turn it ON.
- Enable Email Routing for the zone and let Cloudflare add its required MX and SPF records ("Add records and enable"). Confirm there are no errors on the routing page.
- For any API path you are unsure of, check Cloudflare's current Email Routing API docs. Do not guess endpoints.

PHASE 4 — GOOGLE APP PASSWORD
- Signed in as {{GMAIL_ADDRESS}}, go to Google Account → search "App passwords" (myaccount.google.com/apppasswords). Create one named "Gmail send-as {{DOMAIN}}". Copy the 16-character value immediately and remove the spaces. If Google asks me to re-enter my password or approve on my phone, ask me for exactly that.

PHASE 5 — SEND MAIL AS EACH ADDRESS (Gmail)
For each address marked "needs send-as = yes":
- Gmail → Settings → See all settings → Accounts and Import → "Send mail as" → "Add another email address". If the pop-up is blocked, allow pop-ups for mail.google.com.
- Name: the display name. Email: <local part>@{{DOMAIN}} (the CUSTOM address, never the Gmail one). Keep "Treat as an alias" ticked → Next Step.
- SMTP Server: smtp.gmail.com | Port: 587 | Username: {{GMAIL_ADDRESS}} | Password: the App Password without spaces | Secured connection using TLS → Add Account.
- Gmail sends a confirmation email to the custom address, which forwards to the same Gmail inbox. Open it and click the confirmation link (or paste the code).
- After all addresses are added: set "When replying to a message" to "Reply from the same address the message was sent to".

PHASE 6 — DELIVERABILITY RECORDS (Cloudflare DNS)
- SPF: there must be exactly ONE TXT record starting with "v=spf1" at the root. Edit the one Cloudflare created so it reads: v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all. Never create a second SPF record.
- DMARC: if no TXT record exists at _dmarc.{{DOMAIN}}, create one: v=DMARC1; p=none; rua=mailto:{{GMAIL_ADDRESS}}. If one exists with p=quarantine or p=reject, change it to p=none. Gmail send-as signs mail as gmail.com, so a strict policy would cause bounces or spam.
- Do not add DKIM records for Google. This setup does not use Workspace DKIM.

PHASE 7 — PROFILE PICTURE (Google account per address)
For each address marked "needs profile picture = yes":
- Open https://accounts.google.com/signup/v2/webcreateaccount?flowName=GlifWebSignIn&flowEntry=SignUp (in a separate browser profile or a guest/incognito window, so you don't disturb the signed-in Gmail session).
- Enter the display name, birthday and gender (ask me once for the birthday/gender to use for all accounts if I didn't provide them), then choose "Use your existing email" and enter <local part>@{{DOMAIN}}.
- Google emails a verification code to that address. Read it from the {{GMAIL_ADDRESS}} inbox and enter it.
- Generate a strong unique password, then ask me to store it. Show it to me once in a message I can save.
- If Google requires a phone number or a QR scan, ask me to do it. This is a genuine human step.
- Once signed in, open the account avatar → upload {{PROFILE_PICTURE_PATH_OR_URL}} → save.

PHASE 8 — END-TO-END TESTS (all must pass)
- RECEIVE: from {{GMAIL_ADDRESS}} you cannot test receiving (Gmail hides mail you send to yourself). So send a test to each custom address from {{TEST_EMAIL}} if you have access to it, otherwise ask me to send one. Then confirm each one arrived in {{GMAIL_ADDRESS}}.
- CATCH-ALL (if enabled): ask me (or use {{TEST_EMAIL}}) to send to random-test-123@{{DOMAIN}} and confirm it arrived.
- SEND: compose from each send-as address to {{TEST_EMAIL}}, then confirm the "From" shows the custom address and that it landed in the inbox, not spam. If it went to spam, report it and the likely cause.
- WEBSITE: if a site exists, confirm https://{{DOMAIN}} still loads.
- If any test fails, debug it yourself (check DNS records, routing-rule status, the destination's verified status, SMTP settings, App Password spaces, DMARC policy) and retry before reporting.

FINAL REPORT (send this to me when everything is done)
- A table of every address: receive ✓/✗, send-as ✓/✗, profile picture ✓/✗.
- The nameservers now in use and the DNS records you created or changed (type, name, value), plus any record you removed or edited and what it was before.
- Anything that still needs me, with exact instructions.
- Where each credential is used. Never print a full secret; show only the last 4 characters.
- A 3-line warm-up tip: send real one-to-one mail first, avoid bulk/cold blasts from this new domain, and use a dedicated sending service on a subdomain for newsletters.

Begin now with Phase 0.

Two tips for running it:

  • Log in first. Open Gmail, Cloudflare and your registrar in the browser the agent will use before you start. The agent will then almost never need to stop and ask you anything.
  • API tokens are optional. Without them the agent clicks through the dashboards just like you would. With a Cloudflare API token that has Zone, DNS and Email Routing edit permissions, it's faster and less fragile.

Quick Troubleshooting

  • No App Passwords page? 2-Step Verification is off. Turn it on, then search again.
  • Gmail says it couldn't reach the server? You probably pasted the App Password with spaces in it, or typed your custom address as the username. The username is always your Gmail address.
  • Test emails never arrive? Check that the destination shows *Verified*, that Email Routing shows *Enabled*, and that you sent the test from a *different* account. Gmail quietly hides mail you send to yourself.
  • Website went down after moving to Cloudflare? Set the site's A/CNAME records to *DNS only*.
  • Replies land in spam or bounce? Relax DMARC to p=none, merge Google into your single SPF record, and send slowly while the domain builds a reputation.

Full credit again to Ali Solanki for the method. If you want help with warming up a domain, his email is in the video description.

KEEP READING