On this page
How to Set Up Cloudflare for a Small Project
Point a domain at Cloudflare in 15 minutes: change nameservers, proxy your DNS records, and get free CDN, TLS, and DDoS protection.
Quick answer
- Cloudflare sits between your visitors and your host, proxying DNS and traffic through its edge.
- Setup is: create an account, add your domain, replace your registrar’s nameservers, and let Cloudflare scan your DNS records.
- The free plan gives you CDN caching, automatic TLS, and DDoS protection with no cost.
What do I need before starting?
A domain you can control at its registrar, and the DNS records for that domain — typically an A record pointing at your server or a CNAME for a managed host like Netlify or Vercel. Write the records down or keep the registrar page open; Cloudflare can usually import them automatically during setup.
How do I move my domain to Cloudflare?
Create a Cloudflare account, add your domain, pick the free plan, and Cloudflare scans existing DNS records and proposes a zone. Then go to your registrar and replace its nameservers with the two Cloudflare nameservers shown on the overview page. Propagation takes minutes to a few hours; Cloudflare emails you when the zone is active.
# Verify the zone is active (nameservers propagated)
dig +short NS example.com
# Expected: the two Cloudflare nameservers, e.g.
# ada.ns.cloudflare.com.
# nash.ns.cloudflare.com.What does ‘it worked’ look like?
In the Cloudflare dashboard, your domain shows ‘Active’ and the DNS records have an orange cloud icon, which means traffic is proxied through Cloudflare. Load your site and confirm the padlock appears; Cloudflare issues and renews TLS automatically. If a record shows a grey cloud, it’s DNS-only — that record isn’t proxied, so it gets none of the CDN or protection.
Where this bites vibecoders
Managed hosting already gives you HTTPS, so a vibecoder can ship for months without touching DNS. Cloudflare becomes relevant when you self-host, need a custom domain on a platform, or suddenly care about DDoS and bot traffic. Because the AI assistant can’t see your registrar or dashboard, this is one of the few setups where you’ll do the clicking — but the payoffs (TLS, caching, protection) are immediate.
Where AI coding assistants get this wrong
- Adding Cloudflare without changing nameservers, then wondering why traffic never proxies.
- Leaving the orange cloud off on a record the site depends on, silently bypassing TLS and caching.
- Enabling ‘Always Use HTTPS’ while a service still calls the site over http:// and breaks.
- Not waiting for propagation and concluding the setup failed after five minutes.
Checklist
- Keep a copy of your existing DNS records before switching nameservers.
- Confirm every record you need is proxied (orange cloud), not DNS-only.
- Turn on Always Use HTTPS once the zone is active.
- Test the site from a different network after propagation.
FAQ
Does moving DNS to Cloudflare change my email?
Only if you remove your MX records during the switch. Cloudflare’s scan imports existing MX records automatically, so email keeps working; verify they’re present after the zone activates.
Can I keep my domain at its registrar?
Yes. You change nameservers, not the registration. Your registrar still bills you and handles renewals; Cloudflare only serves DNS and proxies traffic.
Related topics
- What Is a CDN and Do You Need One?
- How to Add HTTPS to a Static Site
- What Is a Subdomain Takeover?
- What Is Web Cache Poisoning?
- Multi-Cloud vs Hybrid Cloud: What’s the Difference?
- What Is a Reverse Proxy?