Cloudflare is a world-renowned Content Delivery Network (CDN) and Web Application Firewall (WAF) that accelerates website loading speed and safeguards your server against DDoS and bot attacks.
Step 1: Add Your Domain to Cloudflare
- Create a free account or log in at Cloudflare.com.
- Click Add a Site and enter your domain name (e.g.,
yourdomain.com). - Select the Free Plan ($0/month) and click Continue.
- Cloudflare will automatically scan and import your existing DNS records (A, CNAME, MX).
Step 2: Update Nameservers at Your Domain Registrar
- Cloudflare will provide two assigned nameservers (e.g.,
ns1.cloudflare.comandns2.cloudflare.com). - Log in to your domain registrar (e.g., BahariHost Client Area → Domains → Manage Nameservers).
- Replace your current hosting nameservers with the Cloudflare nameservers and save changes.
- Back on Cloudflare, click Done, check nameservers.
Important SSL Setting: Inside Cloudflare dashboard → SSL/TLS → Overview, set your encryption mode to Full or Full (strict) to prevent
ERR_TOO_MANY_REDIRECTS loops.
Watch the Video Tutorial!
Follow the step-by-step video guide below to configure Cloudflare smoothly: