Setting Up Cloudflare with DirectAdmin
Cloudflare is a free CDN and security service that speeds up your site and protects it from attacks.
Step 1: Sign Up and Add Your Domain
- Go to cloudflare.com and create a free account.
- Click Add a Site and enter your domain name.
- Select the Free plan.
- Cloudflare scans your DNS records — verify they are correct.
Step 2: Update Your Nameservers
Cloudflare provides two nameservers (e.g. aria.ns.cloudflare.com, bob.ns.cloudflare.com).
Update these at your domain registrar (not DirectAdmin — your registrar is where you purchased the domain).
DNS propagation takes up to 48 hours.
Step 3: Recommended Cloudflare Settings
SSL/TLS
- Set to Full (Strict) if you have a valid SSL certificate on your server.
- Set to Full if using a self-signed cert.
Speed
- Enable Auto Minify (HTML, CSS, JS)
- Enable Brotli compression
Caching
- Set Caching Level to Standard
- Enable Always Online for availability during server downtime
Security
- Set Security Level to Medium
- Enable Bot Fight Mode (free)
Keeping DirectAdmin DNS Working
With Cloudflare active, DNS changes must be made in the Cloudflare dashboard, not DirectAdmin. Cloudflare acts as your authoritative DNS.
Exception: DirectAdmin still manages the actual hosting. Only DNS/CDN goes through Cloudflare.
Checking If Cloudflare Is Active
curl -I https://yourdomain.com | grep cf-ray
If you see a cf-ray header, Cloudflare is active.