What This Guide Does

This guide walks you through pointing your domain name to Cloudflare's DNS servers — so your website gets automatic free SSL (HTTPS), faster global load times, and protection from attacks. You will use two accounts: your domain registrar (where you bought your domain) and Cloudflare (free). That's it.

If you've just built a website — whether using the Build Your Website playbook, Cloudflare Pages, or any other host — you need DNS configured before your custom domain works. This is the step most beginners get stuck on. After this guide, it won't be.

What Is Cloudflare and Why Do You Need It?

Cloudflare is a network that sits between your website and the rest of the internet. When someone types your domain into a browser, their request passes through Cloudflare first. That gives you:

All of the above is completely free on Cloudflare's Free plan. Over 20% of all websites on the internet use Cloudflare. If you're deploying to Cloudflare Pages (the recommended hosting for this platform), you're already on their infrastructure — connecting DNS takes this from "sort of works" to "fully live."

The Two Accounts You Need

This is the key insight that trips people up: you're not moving your domain — you're just telling your domain registrar to hand off DNS control to Cloudflare. Your domain registration stays exactly where it is.

Your Domain Registrar

This is where you bought your domain name — Namecheap, GoDaddy, Google Domains, Squarespace, etc. You'll log in here to change two values called nameservers.

Already have this

Cloudflare Account

A free account at cloudflare.com. If you don't have one yet, creating it takes 2 minutes and requires no credit card. The free plan covers everything in this guide.

100% free

⚠️ Affiliate disclosure: Some links on this page may be affiliate links. We may earn a commission at no extra cost to you. We only recommend tools we actually use.

Don't have a domain yet? We recommend Namecheap — domains start around $10/year, the interface is clean, and changing nameservers is a single dropdown. It's the easiest registrar to pair with Cloudflare.

Step-by-Step: Setting Up Cloudflare DNS

  1. Create your free Cloudflare account

    Go to cloudflare.com and click Sign Up. Enter your email and a password. No credit card required — select the Free plan when prompted.

    💡 Use the same email you track business accounts with. You'll refer to this dashboard often.
  2. Add your domain to Cloudflare

    Once logged in, click Add a domain (or "+ Add site" on the dashboard). Type your domain name — for example, mysite.com — without www or https. Click Continue.

    💡 Enter just the root domain — mysite.com not www.mysite.com.
  3. Select the Free plan

    Cloudflare will show you plan options. Click Free — $0/month and continue. For the vast majority of websites, the free plan is everything you need.

  4. Review your DNS records

    Cloudflare will scan your existing DNS records and import them automatically. You'll see a list of records — A records, CNAME records, MX records (email), etc. Do not delete anything here. If you're using Cloudflare Pages, you'll add a CNAME record in a later step, but for now just confirm the existing records look right and click Continue.

    💡 If your site is new and there are no records, that's fine — Cloudflare just has nothing to import yet.
  5. Copy your two Cloudflare nameservers

    This is the critical part. Cloudflare will show you two nameservers assigned specifically to your account — they look like this:

    Your Cloudflare Nameservers (example — yours will differ)
    ada.ns.cloudflare.com Nameserver 1
    bob.ns.cloudflare.com Nameserver 2

    Copy both values exactly. You'll paste them into your domain registrar in the next step. Keep this tab open.

  6. Log in to your domain registrar and update nameservers

    Open a new tab and log in to wherever you bought your domain — Namecheap, GoDaddy, Google Domains, etc. Find the Domain Settings or Manage section for your domain, then look for Nameservers or DNS.

    Change the nameserver setting to Custom Nameservers (or "Use Custom DNS"), then paste in the two Cloudflare nameserver values from Step 5. Save the changes.

    💡 On Namecheap: go to Domain List → Manage → scroll to Nameservers → select "Custom DNS" from the dropdown → paste both values → click the green checkmark.
  7. Click "Done, check nameservers" in Cloudflare

    Go back to your Cloudflare tab and click Done, check nameservers. Cloudflare will start checking. You'll land on your domain's overview page showing "Pending nameserver update" — this is normal.

    💡 Cloudflare sends you an email when the nameservers are confirmed active. Usually arrives within 1–4 hours, sometimes within 20 minutes.
  8. Wait for propagation, then verify

    DNS propagation means the change spreading to all DNS servers worldwide. It typically takes 1–4 hours, though Cloudflare often confirms it faster. Once Cloudflare emails you, your domain overview will show Active in green.

    You can monitor propagation in real time at whatsmydns.net — enter your domain and check the NS (nameserver) records. When you see Cloudflare nameservers appearing globally, you're live.

    Done. Your domain is now running through Cloudflare. SSL is automatically provisioned — your site will be accessible via HTTPS within minutes of activation.

Using Cloudflare Pages? One Extra Step

If your site is deployed on Cloudflare Pages (the free hosting platform where this site lives), you need one more step to connect your custom domain.

  1. Go to your Pages project in Cloudflare

    In the Cloudflare dashboard, click Workers & Pages → select your project → click the Custom domains tab.

  2. Add your custom domain

    Click Set up a custom domain, enter your domain (e.g. mysite.com), and confirm. Cloudflare automatically creates the CNAME record pointing to your Pages deployment. No manual DNS entry needed.

    💡 Also add www — add it as a second custom domain and Cloudflare will handle the redirect automatically.

Your Free SSL Certificate — What Just Happened

The moment Cloudflare becomes active on your domain, it provisions a free TLS/SSL certificate from its own certificate authority. This means:

In the Cloudflare dashboard under SSL/TLS, set the mode to Full (strict) if your origin server also has a certificate (Cloudflare Pages does), or Flexible if your origin doesn't. For Cloudflare Pages: use Full (strict).

Registrar vs Cloudflare — What Each One Does

Task Domain Registrar (Namecheap, etc.) Cloudflare
Owns your domain registration Yes — stays here No
Controls DNS routing No (after nameserver change) Yes
Provides SSL certificate Paid add-on Free, automatic
CDN / global caching No Yes
DDoS protection No Yes (free tier)
Renew annually Yes — domain renewal No — Cloudflare is free forever

Common Issues and How to Fix Them

Still showing "Pending" after 24 hours

Double-check that you saved the nameservers at your registrar — it's easy to paste them in but not click Save. Also verify there are no spaces or typos. On Namecheap, look for the green checkmark confirmation after saving.

Site shows "Too many redirects" error

This usually means your SSL mode is set to Flexible but your origin already has SSL. Go to Cloudflare → SSL/TLS → change to Full or Full (strict). The redirect loop will stop immediately.

Email stopped working after switching nameservers

Your MX records (which route email) should have been imported automatically in Step 4. Go to Cloudflare → DNS and check that your MX records are there. If they're missing, add them back manually — your email provider will have documentation showing the correct values.

"This site can't be reached" error

Propagation is still in progress — most likely. Wait another hour and try again. If it persists after 24 hours, check that your A record or CNAME record in Cloudflare → DNS is pointing to the correct IP or hostname for your hosting provider.

Building Your Site from Scratch?

The Build Your Website playbook walks you through creating a complete website with AI — from first prompt to live on Cloudflare Pages with your custom domain connected.

Read the Build Playbook →

Frequently Asked Questions

How long does Cloudflare DNS propagation take?

Cloudflare says up to 24 hours, but in practice it usually completes within 1–4 hours and often within 30 minutes. You can monitor it at whatsmydns.net — enter your domain and check the NS records.

Is Cloudflare DNS free?

Yes. The Free plan includes DNS management, CDN, DDoS protection, free SSL/TLS, and basic analytics. No credit card required. The free plan is sufficient for most websites and small businesses indefinitely.

Do I need to move my domain to Cloudflare?

No. You keep your domain registered wherever you bought it and simply update the nameservers to point to Cloudflare. Cloudflare offers domain registration too (usually cheaper than registrars), but it's completely optional.

What are nameservers?

Nameservers are like a phone book for the internet. When someone types your domain into a browser, their computer asks the nameserver "where does this domain point?" By changing your nameservers to Cloudflare's, you're telling the internet to ask Cloudflare instead of your registrar.

Will my website go down when I switch?

No, if done correctly. Cloudflare imports your existing DNS records first. Your site continues resolving on the old nameservers during propagation. For most sites, there is zero downtime during the transition.

Can I use Cloudflare with any domain registrar?

Yes. Cloudflare works with every major registrar — Namecheap, GoDaddy, Google Domains, Porkbun, Hover, and others. As long as your registrar allows custom nameservers (all of them do), you can use Cloudflare.

Need a Domain First?

Namecheap is our recommended registrar — domains from ~$10/year, simple interface, and nameserver changes are a one-step dropdown. Pairs perfectly with Cloudflare.

Get a Domain on Namecheap → Build Your Website Playbook →

Related Guides