Skip to main content

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.

This step is optional

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:

  1. In the Cloudflare dashboard, click Domain Registration in the left sidebar
  2. Click Register Domain
  3. Search for the domain you want (e.g., yourname.com)
  4. 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

  1. In the Cloudflare dashboard, go to Workers & Pages
  2. Click on your project
  3. Go to the Custom domains tab
  4. Click Set up a custom domain
  5. Enter your domain name (e.g., yourname.com)
  6. 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.

  1. Cloudflare will show you the DNS record it's about to create — a CNAME pointing your domain to your Pages project
  2. 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:

  1. Go back to the Custom domains tab in your Pages project
  2. Click Set up a custom domain again
  3. Enter www.yourname.com
  4. 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.