1

I have a static site using Cloudflare Pages.

I am not using any custom reverse proxy functionality provided by the Cloudflare CNAME DNS Proxy i.e. when you tell Cloudflare to use an A record instead of CNAME to reverse proxy the request to your upstream.

By default, when setting up a custom domain on Cloudflare Pages, Cloudflare sets the DNS CNAME to "Proxy". I have disabled this, because I assume this will cause a small performance hit due to the extra proxy hop.

Does anyone have any deeper understanding of this?

My contrary thought is that maybe the Cloudflare Pages team is relying on the caching of the reverse proxy instead of providing more edge node asset distribution on the Pages nodes.

1 Answers1

1

I have disabled this, because I assume this will cause a small performance hit due to the extra proxy hop.

That's true. I was getting consistent ~200ms response time to a cached static site –let's call it foo.com– and ~110ms for foo.pages.dev.

By turning Proxy off, I am getting ~110ms response time for both foo.com and foo.pages.dev.

My only doubt was if they generated SSL certificates for non-proxied domains, but turns out they do.

Proxy is enabled by default just in case you'll need some of the other services Cloudflare offers for managed domains, as Analytics, Page Rules, custom DDoS protection, custom cache... Those services won't work for your custom domain if you opt out of the Proxy (although you'll still get DDoS protection and cache through Cloudflare Pages).

Just remember that if you have www.foo.com pointing to foo.com with a Bulk Redirect, Page Rule or Dynamic Redirect, that CNAME does have to be proxied so that the redirect works, as they explain in the documentation.

Dani Haro
  • 11
  • 3