🌐 Prepare Domain and Cloudflare
This step is optional but highly recommended.
Setting up your domain with Cloudflare provides:
- HTTPS with automatic SSL/TLS
 - DDoS protection
 - Web Application Firewall (WAF)
 - Bot mitigation
 
Even if you skip this, your deployment can proceed, but without these protections.
1. Create a Cloudflare Account
- Go to https://dash.cloudflare.com
 - Add your domain (e.g. 
example.com) - Cloudflare will import your existing DNS records.
 
2. Update Nameservers
Cloudflare will provide two nameservers (e.g. emma.ns.cloudflare.com and gabe.ns.cloudflare.com).
Update your domain registrar to use these nameservers. Once propagated, Cloudflare becomes your DNS and security proxy.
3. Add DNS Records
In DNS → Records, add:
- A Record → your server IP (e.g. 
123.45.67.89) - Proxy status: 🟧 Proxied (orange cloud) — enables DDoS, WAF, and caching.
 - CNAME Record for subdomains if needed.
 
4. Enable SSL/TLS
- Go to SSL/TLS → Overview
 - Set mode to Full (Strict) if your server has a valid certificate
 - Enable Always Use HTTPS under Edge Certificates
 
5. Configure Security Rules (Recommended)
- Enable DDoS Protection (on by default)
 - Turn on Web Application Firewall (WAF)
 - Activate Bot Fight Mode if desired
 - Optionally, use Under Attack Mode during high-risk periods
 
Last updated on