Set Up Cloudflare DNS on DirectAdmin Hosting

If you're already using Web Hosting with DirectAdmin, adding Cloudflare as an additional layer will make your website load faster, become more secure, and gain free SSL instantly. This guide walks you through every step from start to finish.

What is Cloudflare and Why Use It

Cloudflare is a free CDN (Content Delivery Network) and DNS Management service used by over 20 million websites worldwide. It acts as an intermediary between your visitors and your Hosting Server.

Key Benefits of Cloudflare Faster website loading with 300+ PoP CDN globally | Free DDoS Attack protection | Free SSL Certificate (HTTPS) | Hides your real server IP | Reduces Hosting Bandwidth usage
FeatureCloudflare FreeCloudflare Pro
CDN (Content Delivery Network)✅ Unlimited✅ Unlimited
DDoS Protection✅ Basic✅ Advanced
Free SSL✅✅
Page Rules3 rules20 rules
WAF (Web Application Firewall)❌✅
PriceFree$20/month

What You Need Before Starting

Before configuring Cloudflare with DirectAdmin Hosting, prepare the following information:

⚠️ Warning If your website has high traffic, do this during low-traffic hours, as DNS Propagation may cause brief downtime (10–60 minutes).

Sign Up for Cloudflare and Add Domain

1
Go to cloudflare.com and click "Sign Up"

Enter your email and password, then verify your email address.

2
Click "Add a Site"

Type your domain name (e.g., example.com) and click Continue.

3
Select the "Free" Plan and click Continue

The free plan is sufficient for most websites. No credit card required.

4
Wait for Cloudflare to Automatically Scan DNS Records

After about 1–2 minutes, Cloudflare will import your existing DNS records for review.

Review DNS Records

This is the most critical step. Incorrect DNS Records will cause your website and email to stop working.

💡 How to Find Your Hosting IP in DirectAdmin Go to DirectAdmin Panel → Account Manager → Show All Users → Click your Account name → Look for the IP Address field.

A Records for Website

TypeNameContentProxy
A@Your Hosting IP, e.g., 103.x.x.x🟠 Proxied
AwwwYour Hosting IP🟠 Proxied
MX@mail.example.com⚫ DNS only
AmailYour Hosting IP⚫ DNS only
⚠️ MX Records Must Be DNS Only MX, mail, SMTP, POP3, and IMAP records must have Proxy disabled (grey cloud). An orange cloud on these records will break email sending and receiving.

Change Nameservers at Your Registrar

Cloudflare will display the Nameservers to change, such as alice.ns.cloudflare.com and bob.ns.cloudflare.com.

1
Log in to your Domain Registrar

Such as AsiaGB Domain, GoDaddy, Namecheap, or any other registrar.

2
Find the "Nameserver" or "DNS Management" section

Change the NS records to the Nameservers that Cloudflare assigned to you.

3
Save the changes

Wait for DNS Propagation (24–48 hours, though usually faster at 4–8 hours).

✅ Verify Propagation Use whatsmydns.net or type in Terminal: dig example.com NS. If you see Cloudflare's NS, the change was successful.

Configure SSL and Security Settings

SSL/TLS Encryption Mode

Go to SSL/TLS → Overview and select the appropriate mode for your Hosting:

ModeDescriptionRecommended For
OffNo HTTPS at all❌ Not recommended
FlexibleHTTPS between User-Cloudflare but HTTP between Cloudflare-HostingHosting without SSL
FullHTTPS both ways but no certificate verificationSelf-signed SSL
Full (Strict)HTTPS both ways with valid certificate verification✅ Valid SSL certificate
💡 AsiaGB Hosting Includes Free Let's Encrypt SSL It is recommended to set the mode to Full (Strict) for maximum security.

Always Use HTTPS

Go to SSL/TLS → Edge Certificates and enable "Always Use HTTPS" to automatically redirect HTTP → HTTPS.

Performance and Caching Settings

Recommended Speed Settings

⚠️ If You Update Your Site Frequently Temporarily set Cache Level to "Bypass" or use Development Mode (available for 3 hours) to see changes immediately.

Email Configuration with Cloudflare

Email on DirectAdmin Hosting works through a direct IP connection (not through Proxy), so DNS must be configured correctly.

DNS Records for Email

; A Record for mail subdomain — must be DNS Only
A     mail    <Hosting IP>     DNS only

; MX Record — points to mail.example.com
MX    @       mail.example.com  (Priority 10)    DNS only

; SPF Record
TXT   @       "v=spf1 ip4:<Hosting IP> ~all"

; DKIM — get the key from DirectAdmin → Email Accounts → DKIM
TXT   default._domainkey    "v=DKIM1; k=rsa; p=..."
    

Verify Everything is Working

After setup is complete and propagation has finished, verify using these methods:

Troubleshooting Common Issues

Issue: ERR_TOO_MANY_REDIRECTS

Caused by SSL Mode set to Flexible while your Hosting already has an HTTP→HTTPS redirect. Fix by changing SSL Mode to Full or Full (Strict).

Issue: Email Not Working

Verify that MX Records and the mail A Record have Proxy disabled (grey cloud). Change any orange cloud records to DNS only immediately.

Issue: Website Not Updating After File Changes

Enable Cloudflare Development Mode (Speed → Optimization → Development Mode) or Purge Cache at Caching → Configuration → Purge Everything.

Frequently Asked Questions

What is Cloudflare DNS and why use it with Hosting?

Cloudflare DNS is a free service that speeds up your website through its CDN network, protects against DDoS attacks, and hides your server's real IP address, making your site faster and more secure.

How do I set up Cloudflare with DirectAdmin Hosting?

Sign up for Cloudflare, add your domain, wait for DNS scan, change Nameservers at your Registrar, verify A Records point to your Hosting IP, enable Proxy (orange cloud), and wait 24-48 hours for propagation.

Will email still work after setting up Cloudflare?

Yes, as long as MX Records are configured correctly. MX Records must point to your mail hostname and the Proxy must be disabled (grey cloud), not orange, because email does not work through Cloudflare Proxy.

Can I use the Cloudflare Free Plan with AsiaGB Hosting?

Yes, the Cloudflare Free Plan includes CDN, DDoS protection, free SSL, and DNS management, which is sufficient for most websites on AsiaGB Hosting.

Can I use Cloudflare SSL with my Hosting SSL together?

Yes, it is recommended to set SSL Mode to Full or Full (Strict) when your Hosting already has an SSL Certificate, ensuring HTTPS is encrypted both between the User and Cloudflare, and between Cloudflare and the server.

How long does DNS Propagation take?

Generally 24-48 hours, but Cloudflare is usually faster. Most sites become accessible within 1-4 hours. You can verify using whatsmydns.net or the dig command.

Summary

Setting up Cloudflare DNS on DirectAdmin Hosting is simpler than it seems. The main steps are: sign up for Cloudflare → review DNS Records → change Nameservers → wait for propagation → configure SSL Mode correctly.

The most important thing to remember is that MX Records for email must be DNS Only at all times, and the SSL Mode should be Full (Strict) when your Hosting already has SSL, to avoid redirect loops.

If you need assistance, AsiaGB Hosting supports DirectAdmin with fast SSD Storage, 99% Uptime, and a support team ready to help.