Setting Up Cloudflare with Your Hosting
Cloudflare provides free CDN, DDoS protection, and performance optimization.
Step 1: Create Cloudflare Account
- Go to cloudflare.com and sign up
- Click Add a Site
- Enter your domain name
- Select the Free plan (or paid for more features)
Step 2: Update Nameservers
Cloudflare will provide two nameservers. Update these in your domain registrar settings.
Step 3: Configure DNS
Cloudflare imports your existing DNS records. Verify:
- A record pointing to your hosting server IP
- MX records for email
- CNAME for www
The orange cloud icon means traffic goes through Cloudflare (proxied).
SSL Settings
- Set SSL mode to Full (Strict) if your server has a valid SSL certificate
- Set to Full if using a self-signed certificate
- Never use Flexible — it creates a redirect loop with many hosting setups
Recommended Settings
- Always Use HTTPS: ON
- Auto Minify: CSS, JS, HTML
- Brotli Compression: ON
- Browser Cache TTL: 4 hours or more
Troubleshooting
- Too many redirects: Set SSL to Full (Strict)
- Email not working: Make sure MX records are NOT proxied (grey cloud)
- Real IP not showing: Use CF-Connecting-IP header
Important
- Do NOT proxy (orange cloud) MX, mail, or FTP records
- Your origin server IP is hidden when using Cloudflare proxy
- Free plan includes basic DDoS protection and CDN