Connecting your DirectAdmin website to Cloudflare delivers powerful advantages including enterprise-grade DDoS mitigation, Web Application Firewall (WAF), global CDN caching, and automatic SSL/TLS encryption.
1. Add Domain to Cloudflare
- Log in to your Cloudflare Dashboard and click Add Site.
- Enter your domain name (e.g.
yourdomain.com) and select the Free Plan. - Cloudflare will automatically scan your existing DNS records.
2. Point Domain Nameservers to Cloudflare
- Copy the 2 custom nameservers assigned by Cloudflare (e.g.
alina.ns.cloudflare.com&kevin.ns.cloudflare.com). - Log in to your domain registrar and update your domain’s Custom Nameservers to the assigned Cloudflare nameservers.
- Wait for DNS propagation (typically 5–30 minutes).
3. Configure Website DNS Records
Under DNS -> Records in Cloudflare, verify the following records:- Root Domain (
@): TypeA, points to yourDirectAdmin Server IP, Proxy status: Proxied (Orange Cloud). - Subdomain (
www): TypeAorCNAME, points to@/DirectAdmin Server IP, Proxy status: Proxied (Orange Cloud).
4. Configure SSL/TLS Encryption
Navigate to SSL/TLS -> Overview in Cloudflare:- Encryption Mode:
- Select Full (if you have already installed a free Let’s Encrypt SSL certificate in DirectAdmin).
- Alternatively, choose Flexible (if no origin SSL is configured yet).
- Under SSL/TLS -> Edge Certificates:
- Enable Always Use HTTPS (automatically redirects all HTTP requests to HTTPS).
- Enable Automatic HTTPS Rewrites.
5. Enable Security & DDoS Protection Features
Navigate to the Security tab in Cloudflare:- Security Level: Set to Medium or High to mitigate malicious traffic.
- Bot Fight Mode: Enable under Security -> Bots to block automated scrapers and malicious crawler bots.
- Under Attack Mode: If your site experiences an active DDoS assault, toggle this mode on the Overview page to present a security challenge to incoming visitors.
