Docs / DNS & Domains / Using Cloudflare DNS with Your Domain

Using Cloudflare DNS with Your Domain

By Admin · Feb 25, 2026 · Updated Apr 24, 2026 · 28 views · 1 min read

Why Cloudflare?

  • Fast global DNS network (one of the fastest resolvers)
  • Free CDN and DDoS protection
  • Free SSL certificates
  • Easy DNS management interface

Setup

  1. Create a free Cloudflare account
  2. Add your domain — Cloudflare scans existing DNS records
  3. Review imported records and fix any missing ones
  4. Update nameservers at your registrar to the Cloudflare ones provided

Proxy vs DNS Only

  • Proxied (orange cloud) — traffic goes through Cloudflare. Enables CDN, SSL, DDoS protection. Hides your server IP.
  • DNS Only (gray cloud) — Cloudflare only provides DNS resolution. Traffic goes directly to your server.

When to Use DNS Only

  • Email records (MX, SPF) — always DNS Only
  • SSH access — if using direct IP anyway
  • Non-HTTP services (game servers, databases)

Page Rules

  • Force HTTPS: *.example.com/* → Always Use HTTPS
  • Cache everything: example.com/static/* → Cache Level: Cache Everything

API Access

# Update DNS record via API
curl -X PUT "https://api.cloudflare.com/client/v4/zones/ZONE_ID/dns_records/RECORD_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"type":"A","name":"example.com","content":"198.51.100.10","ttl":300}'

Was this article helpful?