CDN for Contentful

Cache your Contentful-backed frontend and public media on a hostname you manage. Invalidate affected pages when entries change and isolate preview traffic.

Example cache policy
Public, cacheable resource
/images/published-cover.webp
Bypass shared cache
/preview/article

Connect publication events to cache invalidation

Put Cloud CDN in front of the website or application origin that reads Contentful. Cache HTML, assets and public images. Purge when Contentful webhooks fire.

Front ends close to readers

Cache frontend pages that render published Contentful content. Preview and personalized responses require separate handling.

Asset transformation at the edge

Adapt Contentful images for each layout without baking every size into the CMS.

Webhook-driven purge

Invalidate pages when Contentful publishes so editors are not waiting on TTL.

Configuration

Cloud CDN overview
  1. Front the experience origin

    Connect the website or SSR app that calls Contentful, not the Contentful web app.

  2. Cache pages and assets

    Use long TTLs for hashed assets and purgeable TTLs for HTML.

  3. Hook purge to Contentful

    On publish webhooks, purge the URLs that embed the changed entries.

  4. Map the public hostname

    Attach certificates and cut over DNS after a successful test.

Operational outcomes

  • Contentful-powered sites are delivered from the edge
  • Publish can purge without a full rebuild wait
  • Images can be adapted per page
  • The Contentful web app stays off the public cache

Frequently asked questions

Does this replace the Contentful Images API?

You can still use Contentful assets as the origin. Cloud CDN caches and can further transform what you deliver on your hostname.

Should I cache the Contentful Delivery API?

Usually cache the front end. Caching the Delivery API is optional and must exclude preview and draft tokens.

How do previews work?

Preview hostnames or draft tokens must bypass cache so editors see unpublished changes.

Can I combine this with ISR or SSG?

Yes. Static or incrementally regenerated pages still benefit from a global edge and purge.