Cloudflare Proxy with Shopify: Performance Wins and Setup Notes for 2026
Table of Content
Shopify already runs on Fastly. So why would you add a Cloudflare layer in front? Because the two CDNs solve different problems, and the combination unlocks performance wins that neither delivers alone. This article covers what changes when you proxy Shopify through Cloudflare, what to enable, what to leave off, and the real-world wins Australian merchants typically see. If you want the full setup walkthrough, we have a dedicated guide at Cloudflare Proxy with Shopify. This article focuses on what to optimise once you have the proxy in place.
What Cloudflare adds that Shopify does not
Shopify’s Fastly delivers your store quickly to anyone hitting your custom domain pointed at Shopify nameservers. But Shopify limits what you can control: cache TTL, bot rules, page rules, and edge logic are largely out of reach. Cloudflare gives you that control. With Cloudflare in front, you decide how aggressively to cache HTML, how to handle bots, how to redirect, how to compress, and how to apply security headers. You also get a second worldwide edge layer, which improves TTFB for international visitors.
The TTFB win
For repeat visitors and crawler traffic, Cloudflare can serve cached HTML directly from its edge without touching Shopify at all. That cuts time to first byte from 200 to 400 milliseconds (typical for Shopify) down to 30 to 80 milliseconds.
The trick is cache safety. Logged-in customers, cart pages, and checkout must bypass the cache. You configure this with Cloudflare page rules that exclude cookies indicating an active session, and exclude specific URL paths (/cart, /checkout, /account).
Bot mitigation at the edge
Shopify’s built-in bot protection is limited. Cloudflare lets you challenge or block suspicious traffic before it ever reaches your store. The biggest wins are stopping carding attempts (bots probing stolen card numbers on the checkout), scrapers (competitors lifting your catalogue), and content spam.
Enable Bot Fight Mode for the basic tier, or move to Cloudflare’s Pro plan for more granular rules. Turnstile (Cloudflare’s CAPTCHA replacement) integrates cleanly with Shopify forms. The setup pays for itself fast on stores with any bot traffic problem.
Cache HTML, but cache it carefully
The biggest performance lever is caching HTML responses at the Cloudflare edge. By default Cloudflare does not cache HTML. You enable it by setting a Cache Everything page rule with an edge cache TTL.
Rules of thumb for Shopify:
- Home page: 5 minutes edge cache
- Collection pages: 5 minutes edge cache
- Product pages: 1 to 5 minutes edge cache (lower if inventory matters)
- Blog posts: 60 minutes edge cache
- Cart, checkout, account: bypass cache entirely
Use Cloudflare cache tags to purge specific pages when content changes. Shopify webhooks can trigger Cloudflare API calls to invalidate cache when products or collections update.
Compress more aggressively
Cloudflare supports Brotli compression at level 11, which Shopify does not match. Enabling Brotli on Cloudflare typically reduces text response size by an additional 10 to 15 percent over what Shopify ships. Auto Minify (HTML, CSS, JS) is another quick win. The savings per asset are small but compound across hundreds of requests per page view.
HTTP/3 and 0-RTT
Cloudflare serves HTTP/3 with 0-RTT to supporting browsers, which removes a round trip on TLS handshakes for returning visitors. Shopify supports HTTP/2 but does not yet ship HTTP/3 broadly. The TTFB improvement from HTTP/3 on a typical mobile connection is 50 to 150 milliseconds.
What not to do
A few pitfalls to avoid when proxying Shopify through Cloudflare:
- Do not cache checkout. Ever. You will break sessions, payment, and post-purchase flows.
- Do not enable Rocket Loader. It rewrites your JavaScript loading and frequently breaks Shopify themes.
- Do not enable Email Obfuscation if you use Shopify admin or app-embedded scripts that reference email addresses.
- Do not set very long edge cache TTLs for product pages unless you have webhook-based purge in place. Stock-outs and price changes need to propagate fast.
How to measure the impact
Run PageSpeed Insights before and after enabling Cloudflare. Look at TTFB on the lab metrics. For field data, give Search Console 28 days to refresh, then compare LCP and the document fetched timing.
Most stores we proxy through Cloudflare see TTFB cut by 60 to 80 percent for repeat visitors and 20 to 30 percent for first-time visitors. The improvement compounds across other Core Web Vitals because every metric depends on the document arriving fast.
When Cloudflare in front of Shopify makes sense
Almost always, but especially if you have international traffic, bot pressure, or revenue large enough to justify the operational complexity. The setup is a one-time effort and pays back for years.
If you want help getting Cloudflare in front of your Shopify store, our Sydney web hosting team handles the full setup including cache rules, bot management, webhook integration for cache purges, and ongoing monitoring. The setup typically takes a day; the performance wins last as long as you keep the proxy in place.
