A Next.js CDN caching guide for App Router and ISR

Cache Next.js /_next/static forever, cache ISR and anonymous SSR HTML at Cloud CDN, and bypass draft mode and session routes.

Next.js already thinks in cache. The mistake is leaving that cache in one region. Cloud CDN should hold /_next/static and shareable HTML at 210+ PoPs, with purge on deploy or revalidate.

Hashed static files are the easy win

/_next/static and fonts are immutable. Long TTL, ignore query strings, never purge unless you reuse a filename (you should not).

This alone improves LCP for returning and new sessions once the HTML references those hashes.

ISR and anonymous SSR

If a page is identical for every anonymous visitor, cache the HTML (and shareable RSC payload) at Cloud CDN. Revalidate or deploy should purge those URLs so you do not wait on TTL.

Draft mode, preview tokens and cookie-personalised App Router trees must bypass. If middleware sets a shopper cookie on every HTML response, you cannot cache that HTML as public.

Images

You can keep the Next image optimizer as origin and cache its output, or point public images at Cloud CDN transformation and skip some origin resize work.

Either way the public hostname should be the CDN, not the Node process.

Hosting does not have to change

Self-hosted Node, a container or another host can all be the origin. Cloud CDN is the public edge. Validate on a test hostname including a preview URL that must not be cached.

Frequently Asked Questions

Use Cloud CDN when you host Next.js yourself, want an independent CDN, or run a multi-CDN design in front of the app origin.

Only when it is identical for every anonymous visitor. Personalised RSC must bypass.

CI on production deploy, and your revalidate webhook when ISR updates a path.

Put this on Cloud CDN.

Get started with our Management Console in less than 2 minutes, or connect with an expert to supercharge your business today.