Chapter 8: Connect your domain
The short answer: In your Cloudflare Pages project, open Custom domains and add your domain. If you bought it at Cloudflare, Cloudflare sets everything up for you in a few minutes. If you bought it somewhere else, like Namecheap, you first point it to Cloudflare by changing two "nameservers." The padlock (HTTPS) is free and automatic.
| What you need | Time | Cost |
|---|---|---|
| Your domain (Chapter 2). Your live Pages project (Chapter 7). | About 15 minutes, plus up to 24 hours of waiting if your domain is not at Cloudflare | $0 |
Your name on the front door.
Path A: You bought your domain at Cloudflare (most readers)
- Go to Workers & Pages and open your project.
- Click the Custom domains tab.
- Click Set up a custom domain.
- Type your domain, like
smithpainting.com, and click Continue. - Cloudflare shows the record it will add. Click Activate domain.
- Wait a few minutes. When it says Active, visit your domain. Your site is there, with the padlock.
Make "www" work too
Some people will type www.smithpainting.com. Make that send them to your main address:
1. Repeat steps 3 to 5 for www.smithpainting.com.
2. Then send www visitors to the main address with a redirect. In your domain's dashboard, go to Rules, then Redirect Rules, and use the template for redirecting www to root (or the "apex").
Pick one main address and send everything to it. It keeps Google from seeing two copies of your site.
Path B: You bought your domain somewhere else (like Namecheap)
First, move your domain's DNS to Cloudflare. You keep your domain where it is. You are only changing who answers for it.
- In Cloudflare, click Add a domain (or Add a site). Type your domain. Choose the Free plan.
- Cloudflare scans your current settings. Click Continue.
- Cloudflare shows you two nameservers, like
ana.ns.cloudflare.com. Copy them. - In Namecheap: go to Domain List, click Manage next to your domain, find Nameservers, choose Custom DNS, paste the two Cloudflare nameservers and click the green check.
- Wait. It usually takes less than an hour, and can take up to 24 hours. Cloudflare emails you when your domain is active.
- Then follow Path A above.
Already set up email on that domain? Write down your current email (MX) records before you switch, and make sure Cloudflare copied them in step 2. If they are missing, add them back, or your email will stop working.
How to know it worked
- Your domain loads your site.
- The address bar shows a padlock and starts with
https://. www.and the plain domain both end up at the same address.
Common mistakes
- Panicking after 10 minutes. Changes can take time to spread. Give it a few hours before you change anything else.
- Deleting email records while changing DNS.
- Leaving both www and non-www live with no redirect.
Done? Your site is live on your own domain. Now let's get you a matching email address, free.
Next: Chapter 9, Set up your business email
Stuck? CW Dynamic can help
Last checked: November 20, 2026