Why Does My Website Slow Down When I Use Cloudflare?

Hello Team Cloudflare,

My VPS Server Specs:
CPU cores: 8
Memory: 32 GB
Bandwidth: 33 TB
Disk space: 400 GB

For the past few months, my website has been slowing down when I activate Cloudflare. However, as soon as I pause Cloudflare, my website speeds up. I have only 2 websites on my VPS server.

Another issue arises when I activate Cloudflare on my WordPress website. In the site health, it shows “page cache is detected but server response time is slow”. This error only becomes visible when I activate Cloudflare, and the website only slows down then. When I pause Cloudflare, everything works perfectly.

You can check if the resources are cached on Cloudflare.

Cloudflare does not cache the resource when:

  • The Cache-Control header is set to private, no-store, no-cache, or max-age=0.
  • The Set-Cookie header exists.
  • Cloudflare only caches resources within the Cloudflare data center that serve the request. Cloudflare does not cache off-site or third-party resources, such as Facebook or Flickr, or content hosted on unproxied (grey-clouded) DNS records.

Please do read more at Default Cache Behavior · Cloudflare Cache (CDN) to understand Cloudflare Cache Behavior.

In order to override cache header in this case, you can create a Page Rules with Cache Everything and Edge Cache TTL. Please kindly find the instruction at Create Edge Cache TTL page rules. Please note that setting Edge cache TTL will override the default cache behavior (standard caching) for static files and overrides cache instructions sent by the origin web server. It will also cache non-static assets.

You can also follow the instructions Optimize site speed.

Another things you can also try Argo Smart Routing.