Skip to main content

DNS Records (A, CNAME)

Learning Focus

By the end of this lesson you will know how to configure DNS records in Cloudflare for your domain.

Essential Record Types

TypeNameValueProxyPurpose
A@Server IP✅ ProxiedRoot domain points to your server
AwwwServer IP✅ Proxiedwww subdomain
CNAMEwwwexample.com✅ ProxiedAlternative: alias www to root
MX@mail server❌ DNS onlyEmail delivery
TXT@SPF record❌ DNS onlyEmail authentication

Adding Records in Cloudflare

  1. Go to DNSRecords in the Cloudflare dashboard
  2. Click Add Record
  3. Select the record type, enter name and value
  4. Toggle Proxy status (orange cloud = proxied, grey = DNS only)
  5. Save

Proxy Status (Orange vs Grey Cloud)

StatusBehaviorUse For
Proxied (orange)Traffic flows through Cloudflare CDNWeb traffic (HTTP/HTTPS)
DNS only (grey)Cloudflare resolves DNS onlyEmail, FTP, SSH, direct access
info

Mail records (MX) must always be DNS only. Cloudflare does not proxy email traffic.

Key Takeaways

  • Use A records pointing to your server IP for root and subdomains.
  • Proxy web traffic through Cloudflare (orange cloud) for CDN and security.
  • Keep mail and non-HTTP services as DNS only (grey cloud).

What's Next