Connecting a site to Cloudflare takes just a few steps. After you change the NS servers, all traffic will automatically start passing through Cloudflare.
Step 1: Sign Up for Cloudflare
Go to cloudflare.com and create an account. Choose the free plan.
Step 2: Add the Site
Dashboard → Add a Site → enter your domain (without www or https). Choose the Free plan.
Step 3: Check the Imported DNS Records
Cloudflare automatically scans and imports your domain's DNS records. Make sure all the records are in place:
| Type | Name | Value | Proxy |
|---|---|---|---|
| A | @ | Server IP | ✅ Proxied |
| A | www | Server IP | ✅ Proxied |
| MX | @ | mail.example.com | ❌ DNS only |
| TXT | @ | v=spf1 ... | ❌ DNS only |
Step 4: Change the NS Servers at Your Registrar
Cloudflare will provide two NS servers like these:
alice.ns.cloudflare.com
bob.ns.cloudflare.com
Go to the domain management panel at your registrar (ZevsHost Billing → Domains → DNS) and change the NS servers to the ones Cloudflare gave you.
Step 5: Wait for Activation
NS propagation takes 15 minutes to 24 hours. Cloudflare will send an email once the site is active. You can check with:
dig example.com NS
# Should return ns.cloudflare.com servers
Breaking down connection errors
The site sits in "Pending Nameserver Update" for over a day
The most common cause: the nameservers were saved at the registrar imprecisely (an extra space, a trailing dot, or an old panel interface that never actually saved the change). Check the real nameserver values with dig rather than trusting how they look in the registrar's panel — interfaces cache what they display and do not always show the current state.
Some DNS records are missing after the scan
Cloudflare's auto-scan reads records from the domain's current nameservers at the moment the site is added. If some records are missing (often rare TXT or SRV entries), add them manually under DNS → Records before switching nameservers. For more on record types and the Proxy toggle, see the article on managing DNS in Cloudflare.
"1016 Origin DNS error" after activation
This appears when an A/AAAA record in Proxied mode points to an IP that is currently unreachable or does not resolve. Check that the server answers directly on that IP, and that the record is not left over from a previous host.
Verifying activation
# Confirm the domain uses Cloudflare's nameservers
dig example.com NS +short
# Check that the site is being served through Cloudflare
curl -I https://example.com/ | grep -i "^server\|cf-ray"
# Expected: server: cloudflare, and a cf-ray header present
When you should not connect a site to Cloudflare
- The site already sits behind another CDN or reverse proxy (for example, a corporate WAF) that requires preserving the original headers and IP — double proxying complicates troubleshooting and can break geolocation logic.
- The domain registrar blocks nameserver changes without extra confirmation (for example, .gov domains, some corporate zones) — a separate approval process is needed before the move.
- You need full control over TTL and DNS behavior at an Enterprise-level ISP with its own anycast — in that case using Cloudflare as the sole DNS provider can be overkill; it is smarter to set up Full (Strict) SSL/TLS mode right away and use Cloudflare only for CDN and WAF.
Switching nameservers does not create downtime by itself: until propagation finishes, some visitors keep hitting the old nameservers while others already reach Cloudflare. There is no hard cutover — traffic simply drifts gradually onto the new configuration.
Before switching nameservers, save the current zone file from your previous DNS provider (export it in BIND format) — a backup in case Cloudflare's auto-scan missed something or a rollback to the old configuration is needed.
You can preview how the site will behave through Cloudflare before switching nameservers: temporarily point the domain to the IP from the DNS record in your computer's hosts file — that shows the proxied version of the site locally without affecting any other visitors.
If you need to connect many domains the same way, adding each one by hand through the Dashboard quickly turns into a chore — for bulk onboarding, the API or Terraform is more convenient.
If a domain was once connected to Cloudflare and later removed, the Dashboard may offer to restore its previous zone settings when it is added again — check them carefully before activating, since they may no longer match the server's current configuration.