Shopify CDN Setup: Speed Up Your Store Globally (2026)

Shopify CDN Setup: Speed Up Your Store Globally (2026)
Shopify CDN Setup: Speed Up Your Store Globally (2026)

A customer in London and a customer in Los Angeles both visit your store at the same time. Does one of them wait significantly longer?

Without a proper Shopify CDN setup, the answer is often yes. A Content Delivery Network solves this by serving your store’s assets from servers close to each visitor, no matter where in the world they are. The result is faster load times everywhere, better Core Web Vitals scores, and a store that feels fast to every customer on every continent.

The good news: Shopify already includes a CDN. But most store owners don’t know what it covers, what it doesn’t, and how to get the most out of it.

Summary

A Shopify CDN setup refers to how Shopify uses a Content Delivery Network to serve your store’s static assets, images, CSS, JavaScript, and fonts from edge servers close to each visitor’s location. Shopify includes a built-in CDN powered by Fastly at no extra cost on all plans. Understanding what this CDN covers, where its limitations are, and how to extend its performance is one of the most effective ways to improve global load times, Core Web Vitals scores, and conversion rates for international shoppers. This guide covers the full picture.

What Is a CDN and Why Does It Matter for Shopify?

A Content Delivery Network (CDN) is a global network of servers that stores copies of your website’s static files, images, stylesheets, scripts, and fonts, and delivers them from the server closest to each visitor.

Without a CDN, every visitor’s browser requests files from a single origin server, typically located in one geographic region. A visitor in Sydney requesting files from a server in Virginia adds hundreds of milliseconds of network latency to every single asset on your page.

With a CDN, that same Sydney visitor gets the files from a server in Sydney (or nearby). The round-trip time drops dramatically, and so does your page load time.

For Shopify stores, CDN performance matters because:

  • Most Shopify traffic is global. DTC brands routinely serve customers across multiple continents
  • Images are the largest assets on product pages fast CDN delivery directly reduces LCP
  • Google uses real-world user data for rankings. Slow load times from CDN misses hurt your Core Web Vitals field data in Google Search Console
  • Conversion rates drop with distance-based latency. International customers who experience slow load times abandon at higher rates

Does Shopify Have a Built-In CDN?

Yes, Shopify includes a CDN on every plan, at no extra cost. Shopify uses Fastly as its CDN provider. Fastly operates a global network of edge servers across North America, Europe, Asia-Pacific, South America, and beyond. When you upload assets to Shopify, they’re automatically distributed to Fastly’s edge nodes. This means every Shopify store benefits from CDN delivery for its static assets without any setup required from the store owner. Here’s what Shopify’s built-in CDN covers:
Asset TypeCDN Delivered?
Product imagesYes
Collection imagesYes
Theme CSS filesYes
Theme JavaScript filesYes
Font files uploaded to the themeYes
Blog post imagesYes
HTML pages (storefront)Partial (edge caching, not full CDN)
Checkout pagesYes (Shopify-managed)
Third-party scriptsNo (served from third-party servers)
Dynamically generated contentNo
The most important takeaway: Shopify’s CDN covers your static assets automatically. But it does not cover third-party scripts from apps, dynamically generated page content, or server-side rendered data, which can still create performance bottlenecks.

How Shopify CDN Setup Works: The Technical Picture

Understanding how Shopify’s CDN works helps you make better optimization decisions.

Asset URLs and CDN Delivery

When you upload images or theme files in Shopify, they’re stored and served via Shopify’s CDN. You’ll notice Shopify asset URLs look like:

https://cdn.shopify.com/s/files/1/XXXX/XXXX/files/your-image.jpg

The cdn.shopify.com domain is Shopify’s CDN endpoint. All assets accessed through this URL are served from Fastly’s edge network automatically, with no configuration required.

Image Optimization Through the CDN

Shopify’s CDN includes automatic image optimization features:

  • WebP conversion Shopify serves images in WebP format to browsers that support it (virtually all modern browsers), reducing file size by 25–35% without quality loss
  • Responsive image sizing Shopify’s CDN can serve images at specific dimensions using URL parameters: image.jpg?width=600 serves a 600px wide version of the image
  • Automatic HTTPS: All CDN-delivered assets are served over HTTPS with valid SSL certificates

Caching Behavior

Shopify sets cache headers on CDN-delivered assets. Images and theme files are cached at the edge with long cache lifetimes, meaning repeat visitors get assets from the CDN cache rather than re-downloading them.

When you update an image or theme file in Shopify, the URL changes (Shopify appends a version hash), which forces the CDN to serve the new version rather than the cached one.

What Shopify CDN Setup Doesn’t Cover (And What to Do About It)

Understanding the gaps in Shopify’s built-in CDN is where the real optimization opportunity lies.

Gap 1: Third-Party App Scripts

Every app you install typically loads JavaScript from the app developer’s own servers, not from Shopify’s CDN. If an app’s servers are slow or geographically distant from your visitor, that script loads slowly regardless of how fast Shopify’s CDN is.

What to do:

  • Audit your apps and remove those not actively generating value (fewer third-party scripts = fewer CDN gaps)
  • Load all third-party scripts through Google Tag Manager GTM allows you to control when and how scripts load, reducing the impact of slow third-party servers
  • Where possible, choose apps from providers with global CDN infrastructure

Gap 2: Dynamically Generated Page Content

HTML pages in Shopify are server-rendered on request. The initial HTML response comes from Shopify’s servers, not cached at the edge in the same way static assets are. For most stores, Shopify’s infrastructure is fast enough that this isn’t a bottleneck. But for high-traffic stores during traffic spikes, dynamic content can slow response times.

What to do:

  • For Shopify Plus stores, explore Shopify Hydrogen with Oxygen. Oxygen is Shopify’s edge hosting platform that serves Hydrogen storefronts from edge nodes globally, effectively CDN-delivering your full HTML responses
  • Use aggressive browser caching for resources that don’t change often

Gap 3: External Font Services

If you’re loading fonts from Google Fonts or Adobe Fonts, those requests go to external servers, not Shopify’s CDN. On slower connections or from distant locations, font loading can delay text rendering and increase CLS.

What to do:

  • Upload font files directly to your Shopify theme. This makes them part of your CDN-delivered theme assets
  • Add font-display: swap to prevent render-blocking
  • Preload your primary font file using <link rel=”preload”>

Gap 4: Video Content

Videos hosted externally (YouTube, Vimeo) are not served through Shopify’s CDN. For stores using video on product pages or landing pages, video load time can be a significant LCP issue.

What to do:

  • Use lazy loading for videos, don’t load the video player until the user interacts with it
  • Use a thumbnail image with a play button instead of an embedded video player on initial page load
  • For critical product videos, consider hosting on a video CDN provider (Cloudflare Stream, Mux) and embedding via a lightweight player

How to Optimize Your Shopify CDN Setup for Maximum Performance

Now that you understand what Shopify’s CDN covers and where the gaps are, here’s how to get the most out of it.

Step 1: Use Shopify’s Image Sizing API

Shopify’s CDN can serve images at any size on demand. Instead of loading a 2000px image and scaling it down with CSS (which still downloads the full-size file), use Shopify’s image URL parameters to request the right size:

In Liquid:

liquid

{{ product.featured_image | image_url: width: 800 }}

Or directly in image tags:

html

<img src=”{{ product.featured_image | image_url: width: 800 }}” 

     srcset=”{{ product.featured_image | image_url: width: 400 }} 400w,

             {{ product.featured_image | image_url: width: 800 }} 800w,

             {{ product.featured_image | image_url: width: 1200 }} 1200w”

     sizes=”(max-width: 600px) 400px, (max-width: 1024px) 800px, 1200px”

     width=”800″ height=”800″

     loading=”lazy”

     alt=”{{ product.title }}”>

This serves correctly sized, CDN-delivered, WebP-converted images to every device, one of the most impactful single changes for LCP and bandwidth reduction.

Step 2: Upload Fonts to Your Theme

Instead of loading fonts from Google Fonts or Adobe Fonts, upload the font files directly to your Shopify theme:

  1. Download the font files in WOFF2 format (the most compressed format for modern browsers)
  2. Go to Shopify Admin → Online Store → Themes → Edit Code
  3. Upload the font files to the Assets folder
  4. Reference them in your CSS:

css

  @font-face {

     font-family: ‘YourFont’;

     src: url(‘{{ ‘your-font.woff2′ | asset_url }}’) format(‘woff2’);

     font-display: swap;

   }

The asset_url filter generates the CDN URL for your uploaded font so the font loads from Shopify’s Fastly CDN rather than an external server.

Step 3: Preload Critical CDN Assets

For assets that are critical to the initial page render — your primary font, your hero image add preload hints so the browser requests them as early as possible:

In your theme’s <head>:

liquid

<link rel=”preload” 

      href=”{{ ‘your-font.woff2’ | asset_url }}” 

      as=”font” 

      type=”font/woff2″ 

      crossorigin>

<link rel=”preload”

      href=”{{ section.settings.hero_image | image_url: width: 1200 }}”

      as=”image”>

Preloading CDN assets tells the browser to start fetching them immediately before they’re discovered in the CSS or HTML, reducing time-to-render for above-the-fold content.

Step 4: Minimize Theme Asset File Sizes

Even CDN-delivered files need to be downloaded. Smaller files = faster downloads, regardless of CDN proximity.

CSS optimization:

  • Remove unused CSS rules (use PurgeCSS or a theme that only loads section-specific CSS)
  • Minify CSS, remove whitespace and comments (Shopify does this automatically for theme assets)
  • Combine small CSS files where possible to reduce the number of HTTP requests

JavaScript optimization:

  • Minify JavaScript (Shopify minifies theme JS automatically)
  • Remove unused JavaScript, disable theme features you don’t use
  • Split JavaScript into smaller files loaded only where needed (code splitting)

Step 5: Set Correct Cache Headers for Custom Assets

Shopify sets cache headers automatically for CDN-delivered assets. But if you’re embedding resources that bypass the CDN, custom JavaScript files loaded from external URLs, and external CSS, ensure they have proper cache headers set on their origin server.

Long cache lifetimes (max-age=31536000, one year) are appropriate for versioned static assets that don’t change. Use cache-busting via URL versioning when files are updated.

Step 6: Monitor CDN Performance in Real-World Data

After optimizing your CDN setup, verify the impact with real data:

  1. Google Search Console → Core Web Vitals check LCP improvements in field data (this updates after a 28-day window)
  2. Google Analytics 4 segment performance data by country to see if international load times have improved
  3. GTmetrix runs tests from different geographic locations to measure CDN delivery speed in each region
  4. WebPageTest uses the multi-location test to compare load times from the US, Europe, and Asia-Pacific simultaneously

At 100xelevate, our Shopify Analytics & Tracking setups always include geographic performance segmentation. It’s the only way to accurately measure whether CDN improvements are actually reducing load times for international customers or whether the bottleneck is elsewhere.

Shopify CDN Setup for International and Multi-Market Stores

For brands selling in multiple countries, CDN performance has an even larger revenue impact.

A customer in Germany experiencing a 4-second load time while US customers experience a 1.5-second load time will convert at a significantly lower rate — not because of the product or the price, but because of the experience.

What Shopify Markets Does and Doesn’t Affect CDN

Shopify Markets (Shopify’s multi-market tool) handles currency, language, and pricing by region. It does not change the underlying CDN infrastructure; all stores on Shopify use Fastly’s global network regardless of the Markets configuration.

However, Markets does affect URL structure (/en-us/, /en-gb/, etc.) which means:

  • Each market URL is a separate page that needs to be cached at the CDN edge
  • International SEO requires proper hreflang tags so Google knows which version to show in each country
  • CDN cache warm-up after a new market launch takes time. Initial visitors may get slower responses until the cache is populated

For Shopify Plus: Oxygen and Global Edge Delivery

If you’re on Shopify Plus and running a Hydrogen storefront, Shopify Oxygen extends CDN-like delivery to your full page responses, not just static assets. Oxygen deploys your Hydrogen storefront to Shopify’s global edge network, meaning HTML responses are generated and served from the closest edge node to each visitor.

This effectively CDN-delivers your entire storefront, the same capability that requires expensive infrastructure on other platforms, is included with Shopify Plus.

Our Shopify Plus Development team at 100xelevate builds Hydrogen storefronts on Oxygen for brands where global performance is a primary requirement. The load time parity between US and international customers that Oxygen achieves is not possible with standard Shopify themes.

Shopify CDN Setup and Core Web Vitals

CDN optimization directly impacts all three Core Web Vitals:

LCP (Largest Contentful Paint)

The LCP element on most Shopify product pages is the main product image. CDN delivery of that image from a nearby edge server is the single most direct way to improve LCP for international visitors.

Specific CDN optimizations for LCP:

  • Ensure hero and product images are served through Shopify’s CDN (use image_url filters in Liquid)
  • Use correct image sizing to avoid bandwidth waste
  • Preload the LCP image to trigger its download as early as possible

INP (Interaction to Next Paint)

INP is primarily a JavaScript problem, and third-party scripts that load from slow external servers are a key contributor. CDN optimization for INP means:

  • Reducing third-party scripts (fewer non-CDN assets)
  • Loading remaining third-party scripts through Google Tag Manager with async/defer
  • Minimizing JavaScript size for theme JS (served via Shopify CDN but still needs to parse and execute)

CLS (Cumulative Layout Shift)

CLS is caused by elements that load and shift the layout. CDN delivery can contribute to CLS prevention by:

  • Ensuring fonts are CDN-hosted (prevents layout shift from web font loading)
  • Ensuring images have explicit dimensions (prevents layout shift when images load)
  • Fast CDN delivery means assets load before the user sees them shift

Shopify CDN vs. Adding a Third-Party CDN

Some store owners ask whether to add a third-party CDN (like Cloudflare) on top of Shopify’s built-in CDN. Here’s the honest answer:
ScenarioRecommendation
Standard Shopify storeShopify’s built-in CDN is sufficient; no additional CDN is needed
High-traffic store with DDoS concernsCloudflare adds DDoS protection and security benefits
Store with large video contentVideo-specific CDN (Cloudflare Stream, Mux) for video delivery
Shopify Plus with HydrogenOxygen provides edge delivery additional CDN adds complexity without benefit
Store selling heavily in regions with poor Fastly coverageEvaluate additional CDN coverage
Important: Adding Cloudflare in front of Shopify can create caching conflicts and cause issues with Shopify’s checkout, webhooks, and app functionality if not configured carefully. It’s not a beginner-level change, and for most stores, it’s not necessary. At 100xelevate, our Shopify Audit Services include CDN performance analysis as part of the technical review. We rarely recommend adding a third-party CDN unless there’s a specific, measurable gap in Shopify’s native CDN coverage for the store’s target markets.

Shopify CDN Setup Checklist

Use this to verify your CDN setup is optimized:

Built-In CDN Verification

  • Confirmed product and collection images are using Shopify CDN URLs (cdn.shopify.com)
  • Verified images are being served in WebP format (check browser network tab)
  • Confirmed CSS and JS files load from cdn.shopify.com

Image CDN Optimization

  • Using the image_url filter with explicit width parameters in Liquid
  • Implemented srcset for responsive image sizing
  • All images have width and height attributes
  • Hero/LCP image has a preload hint in <head>
  • Below-the-fold images have loading=”lazy”

Font CDN Optimization

  • Primary fonts uploaded to the Shopify theme Assets folder
  • Fonts referenced using asset_url filter (CDN delivered)
  • font-display: swap added to font-face declarations
  • Primary font preloaded in <head>

Third-Party Script Management

  • All third-party scripts loaded through Google Tag Manager
  • Unused third-party scripts removed
  • Remaining scripts load with async or defer

Performance Verification

  • Ran PageSpeed Insights verified LCP element loads from CDN
  • Ran GTmetrix from a non-US location, confirmed fast asset delivery internationally
  • Checked Google Search Console Core Web Vitals, no CDN-related issues flagged
  • Segmented GA4 by geography, international load time matches domestic

Conclusion

Shopify CDN setup is one of the most foundational elements of store performance, and the good news is that Shopify handles most of it automatically. The built-in Fastly CDN delivers your images, CSS, and JavaScript globally without any action on your part. What separates fast stores from average ones is how well they optimize for what the CDN can do, and how carefully they manage the assets that fall outside CDN coverage. Stores that properly implement Shopify’s image_url filter with responsive dimensions and srcset, host fonts directly inside the theme assets for CDN delivery, preload critical resources like hero images and primary fonts, and reduce the impact of third-party scripts through Google Tag Manager typically achieve far better Core Web Vitals and international load performance.

If you want to identify what is slowing down your store before making changes, get a free Shopify performance audit from 100xelevate.Testing your store from non-US regions using tools like GTmetrix is also essential because many Shopify stores perform well domestically but become noticeably slower for international visitors. If your store serves customers across multiple countries and your international load times are significantly slower than domestic, or if your Core Web Vitals scores still need improvement, a technical performance audit is the right starting point.

At 100xelevate, our Shopify Speed Optimization service covers CDN configuration, image optimization, third-party script management, and Core Web Vitals improvement as a complete integrated system, not just a checklist of disconnected fixes.

Frequently Asked Questions (FAQs)

1. Does Shopify have a CDN?

Yes. Shopify includes a built-in CDN powered by Fastly on all plans at no extra cost. All static assets, product images, theme CSS, JavaScript, and fonts are automatically served from Fastly’s global edge network closest to each visitor’s location. No manual CDN setup is required for standard Shopify stores.

Shopify’s built-in CDN automatically covers product images, collection images, theme CSS files, theme JavaScript files, font files uploaded to the theme, and blog post images. It does not cover third-party app scripts (which load from app developers’ servers), dynamically generated HTML page content, or externally hosted video content.

No separate CDN setup is required for standard Shopify stores; the built-in Fastly CDN handles static asset delivery automatically. However, you can optimize how you use Shopify’s CDN by using the image_url filter with correct dimensions, uploading fonts to your theme assets, and preloading critical assets. Adding a third-party CDN like Cloudflare is generally unnecessary unless you have specific security or performance needs beyond Fastly’s coverage.

Yes, but it requires careful configuration. Cloudflare can be placed in front of Shopify for DDoS protection and additional security features. However, improper Cloudflare configuration can interfere with Shopify’s checkout, webhooks, and app functionality. For most standard Shopify stores, Shopify’s built-in Fastly CDN is sufficient, and adding Cloudflare adds complexity without a meaningful performance benefit.

Shopify’s CDN improves page speed by serving images, CSS, and JavaScript from edge servers geographically close to each visitor, reducing the network latency for every asset download. This directly improves LCP (by loading images faster), reduces total page load time, and improves performance for international visitors who would otherwise experience high latency from a single origin server.

Shopify’s built-in CDN (Fastly) delivers static assets, images, CSS, and JavaScript from edge servers globally. Shopify Oxygen (available with Shopify Plus for Hydrogen storefronts) extends edge delivery to full HTML page responses, meaning the entire page is generated and served from the closest edge node, not just the static files. Oxygen provides CDN-like performance for dynamic content that the standard Fastly CDN cannot cache.

Open your store in a browser, right-click on a product image, and copy the image URL. If it begins with cdn.shopify.com, the image is being served through Shopify’s CDN correctly. You can also open Chrome DevTools → Network tab → reload the page and check that image, CSS, and JavaScript files load from cdn.shopify.com domains. Use GTmetrix with a non-US test location to verify fast delivery internationally.

Yes, indirectly. CDN delivery improves your Core Web Vitals scores, particularly LCP, which Google uses as a ranking factor. Faster CDN delivery means lower LCP times for real users, which improves your Core Web Vitals field data in Google Search Console. For stores with significant international traffic, CDN performance improvements that reduce load times for non-US visitors can lead to measurable improvements in international search rankings.

100xelevate Insights – Transform Your Shopify Store with Top-Notch Design and Modern Tech Stacks
Elevate your Shopify store with 100xelevate! We specialize in UX, UI, CRO, and DXO...
100xelevate Insights – Transforming an Ordinary E-commerce Store into a Digital Brand
Elevate your Shopify store with 100xelevate! We specialize in UX, UI, CRO, and DXO...
100xelevate Insights – Boost Your Shopify Store Sales: 20+ Must-Have CRO Strategies
Discover 20+ CRO strategies to boost your Shopify store sales up to 10X. Learn...

100% Satisfaction Guarantee

We stand behind our service with a 100% Satisfaction Guarantee. If you’re not completely satisfied with our service, we’ll make it right at no additional cost, or provide a full refund with no questions asked. Your success is our success.

Woman stretching in an office to show the flexibility Bulk Hours offer for handling ongoing tasks.

NEWSLETTER

Shopify growth, straight to your inbox.

The CRO experiment, retention plays, and store-speed wins we use to scale the brands we partner with, distilled into a couple of no-fluff emails a month.

Join ambitious Shopify founders and marketers. Unsubscribe anytime.