Economicalhost · Knowledge Base
Knowledge Base › PHP & Performance › How to Set Up Cloudflare CDN with Your Hosting
PHP & Performance

How to Set Up Cloudflare CDN with Your Hosting

Cloudflare's free CDN caches your site across a global network, speeding it up worldwide and absorbing some attack traffic. Setup is via your domain's nameservers.

Step-by-step

  1. Create a free Cloudflare account and add your domain; Cloudflare scans your existing DNS records.
  2. Review the imported DNS records and confirm your main A record (pointing at your EconomicalHost server IP) and MX records are present — see MX records.
  3. Copy the two Cloudflare nameservers it provides.
  4. Change your domain's nameservers to Cloudflare's at your registrar — see changing nameservers.
  5. Wait for activation (DNS propagation, usually a few hours — see propagation).
  6. Set SSL mode to Full in Cloudflare so it works with your server's AutoSSL certificate, and enable Auto Minify and Brotli for extra speed.

💡 Good to know

  • Keep your mail records on Cloudflare set to "DNS only" (grey cloud) so email keeps flowing.
  • Cloudflare "Full" SSL mode pairs correctly with your AutoSSL certificate.
  • Purge the Cloudflare cache after you make site changes, or they may appear delayed.