Connect a Custom Domain
Your site is already live on a free *.pages.dev URL, which works perfectly. But if you bought a custom domain during the prerequisites (or want to buy one now), this page walks you through connecting it.
If you're happy with your-project.pages.dev, you can skip this entirely. Everything works without a custom domain. Come back here whenever you're ready.
Step 1: Make sure you have a domain
If you already bought a domain through Cloudflare during the Cloudflare Account Setup step, you're all set — skip to Step 2.
If you haven't bought one yet:
- In the Cloudflare dashboard, click Domain Registration in the left sidebar
- Click Register Domain
- Search for the domain you want (e.g.,
yourname.com) - Complete the purchase — domains on Cloudflare are sold at cost, typically $10-15/year for a
.com
Step 2: Add the custom domain to your Pages project
- In the Cloudflare dashboard, go to Workers & Pages
- Click on your project
- Go to the Custom domains tab
- Click Set up a custom domain
- Enter your domain name (e.g.,
yourname.com) - Click Continue
Step 3: Confirm DNS settings
If your domain is already registered with Cloudflare (which it will be if you bought it there), Cloudflare handles the DNS records automatically.
- Cloudflare will show you the DNS record it's about to create — a
CNAMEpointing your domain to your Pages project - Click Activate domain
If your domain is registered somewhere else (like GoDaddy or Namecheap), you'll need to either:
- Transfer your domain to Cloudflare (recommended — it's simpler and usually cheaper), or
- Add a CNAME record at your current registrar pointing to
your-project.pages.dev
Step 4: Wait for it to activate
DNS changes can take anywhere from a few seconds to a few minutes. Cloudflare will show the status as "Initializing" and then "Active" once it's ready.
Step 5: Visit your custom domain
Once the status shows Active, open your browser and go to:
https://yourname.com
Your site is now live on your own domain, with HTTPS enabled automatically by Cloudflare.
Adding www as well
If you want both yourname.com and www.yourname.com to work:
- Go back to the Custom domains tab in your Pages project
- Click Set up a custom domain again
- Enter
www.yourname.com - Click Activate domain
Cloudflare will handle the DNS for this one too. Both URLs will point to the same site.
You're done
Your project is:
- Built with Claude Code
- Stored on GitHub
- Deployed on Cloudflare Pages
- Live on the internet with a real URL
Every time you push code to GitHub, your site updates automatically. You have a real, production-grade deployment pipeline — the same kind professional developers use.
Congratulations. You built something real. Now go share it.