CDN for Craft CMS

Serve public Craft CMS pages and media through the edge. Purge affected URLs after entry updates and exclude the control panel and preview requests.

Example cache policy
Public, cacheable resource
/uploads/collection.webp
Bypass shared cache
/admin/

Purge published entries and derived images

Cache public template output, web/assets and eligible transforms at Cloud CDN. Bypass the control panel and live preview. Purge on entry save.

Public templates at the edge

A cache hit on an anonymous page avoids another Craft render and database read.

Transforms without origin resize storms

Cache Craft transforms and optionally replace some of them with edge image optimization.

Control panel stays local to origin

cp, live preview and logged-in requests are not cached.

Configuration

Cloud CDN overview
  1. Pull the Craft web root

    Connect the public origin including asset volumes that are web-accessible.

  2. Cache anonymous pages

    Honour cache headers or set TTLs. Bypass cp and preview.

  3. Purge on entry save

    Invalidate entry URLs and related listing pages from a Craft webhook or module.

  4. Map the site hostname

    Attach TLS and cut over DNS after a successful test hostname.

Operational outcomes

  • Public Craft pages are cached globally
  • Control panel and preview remain dynamic
  • Asset volumes are delivered from the edge
  • Entry saves can purge the reading path

Frequently asked questions

Does this replace Blitz or HTML cache plugins?

No. Origin HTML cache and Cloud CDN stack. The CDN keeps the cached result close to readers.

Can I still use Craft image transforms?

Yes. Cache them at the edge. You can also generate some sizes with Cloud CDN image optimization.

How should multi-site Craft be handled?

Map each public hostname separately so cache keys and certificates stay per site.

Are live previews cached?

They must not be. Bypass preview and tokenised draft URLs.