Tutorial 01

Setting Up Cloudflare — Your First Domain and Website

Buy a domain, point it to Cloudflare, and deploy your first website in under an hour. No server required, no coding needed.

Time: 45–60 minutes Cost: ~$10/year for a domain Level: Complete beginner

What You Will Build

By the end of this tutorial you will have a real website live on the internet with your own domain name — something like myprivateai.com — hosted on Cloudflare for free.

This is the foundation everything else builds on. Every AI app, every Cloudflare Worker, every Android app in this series starts here.

💡 Why Cloudflare? Cloudflare is a free global network that hosts your website, runs your AI code, and stores your data — all without a monthly server bill. Over 20% of the internet runs through Cloudflare.


What You Need Before Starting


Step 1 — Create a Cloudflare Account

1Go to cloudflare.com

Open your browser and go to cloudflare.com. Click Sign Up in the top right corner.

2Enter your email and create a password

Use a real email address you check regularly — Cloudflare will send important notifications here. Create a strong password and click Create Account.

3Verify your email

Check your inbox for a verification email from Cloudflare. Click the link inside. If you don’t see it within 2 minutes, check your spam folder.

🔒 Account security tip: Enable two-factor authentication immediately after creating your account. Go to My Profile → Authentication and add an authenticator app. Your Cloudflare account controls your entire website — protect it.


Step 2 — Register a Domain Name

A domain name is your website’s address — like myprivateai.com or johnsmith.com. You can buy one directly inside Cloudflare, which keeps everything in one place.

1Go to Domain Registration

In your Cloudflare dashboard, click Domain Registration in the left sidebar, then click Register Domains.

2Search for your domain name

Type in the name you want. Try to get a .com if possible — people trust .com most. If your first choice is taken, try adding a word like “my”, “get”, or “app” in front of it.

Good domain names are: short, easy to spell, easy to remember, and say what the site does.

3Purchase the domain

Most .com domains cost about $10–$12 per year through Cloudflare. Cloudflare charges at cost — no markup. Add to cart, enter your payment details, and complete the purchase.

Important: When asked about privacy protection, turn it ON. This hides your personal information (name, address, phone) from the public WHOIS database. It’s usually free and always worth enabling.


Step 3 — Deploy Your First Website

Now you will deploy a simple “Hello World” website to your new domain using Cloudflare Pages — Cloudflare’s free static website hosting.

1Go to Workers & Pages

In your Cloudflare dashboard, click Workers & Pages in the left sidebar. Then click Create and select Pages.

2Choose Direct Upload

You will see options for connecting to GitHub or uploading directly. For now, click Upload assets — this is the simplest way to get started.

3Create your first HTML file

Open Notepad (Windows) or TextEdit (Mac). Copy and paste this exactly:

<!DOCTYPE html>
<html>
<head><title>My First Site</title></head>
<body>
<h1>Hello World! My site is live.</h1>
<p>Built with Cloudflare Pages.</p>
</body>
</html>

Save the file as index.html (make sure it ends in .html, not .txt).

4Upload and deploy

Back in Cloudflare Pages, give your project a name (anything you like), then drag and drop your index.html file into the upload area. Click Deploy site.

Within 30 seconds, Cloudflare will give you a URL like mysite.pages.dev. Open it — your website is live!


Step 4 — Connect Your Domain

Right now your site is on a .pages.dev address. Let’s connect your real domain to it.

1Open your Pages project settings

In Workers & Pages, click on your new project. Go to Custom domains tab and click Set up a custom domain.

2Enter your domain

Type in the domain you just registered (for example myprivateai.com) and click Continue. Since your domain is already on Cloudflare, it will configure the DNS automatically.

3Wait for activation

It usually takes 1–5 minutes for the domain to activate. Refresh the page and when it shows Active, open your domain in a new browser tab.

Your website is now live at your own domain name. 🎉

🎉 You did it! You have a real website on the internet. This same process is how every PrivateAI site started — a domain, a Cloudflare account, and a simple HTML file. Everything from here builds on this foundation.


What You Learned