CDN for Drupal

Cache public Drupal pages and media. Plan which URLs to purge when an editor changes a node and keep previews and signed-in sessions at the origin.

Example cache policy
Public, cacheable resource
/sites/default/files/guide.pdf
Bypass shared cache
/user/login

Invalidate public content after publication

Cache theme assets, the files directory and eligible anonymous pages at Cloud CDN. Bypass authenticated Drupal routes and forms. Purge when editorial content is published.

Anonymous pages closer to readers

Eligible responses for public nodes, views and landing pages can be served from cache until expiry or invalidation.

Files directory off the origin

Images, documents and generated styles are cached and can be transformed at the edge.

Editors still hit Drupal

Logged-in editorial, preview and form POSTs bypass cache so Drupal remains the source of truth.

Configuration

Cloud CDN overview
  1. Connect the Drupal origin

    Pull the existing Drupal host over HTTPS, including /sites/*/files and theme asset paths.

  2. Cache anonymous GETs

    Honour Drupal cache headers or set CDN TTLs for public pages. Bypass session cookies used by authenticated users.

  3. Hook purge to publish

    Purge node URLs and files when content is published or media is replaced.

  4. Map the public hostname

    Attach the production domain and certificate after validating on an Aptranet hostname.

Operational outcomes

  • Public Drupal pages are cached at the edge
  • Authenticated editorial traffic stays dynamic
  • The files directory is delivered globally
  • Publish events can purge the affected URLs

Frequently asked questions

Does this work with Drupal cache tags?

Use purge on publish for the URLs that changed. Cache-tag-to-URL mapping remains an origin concern; the CDN invalidates by URL, file or directory.

Can I cache authenticated pages?

Only if the HTML is truly shareable. Most Drupal authenticated responses should bypass cache.

How are private files handled?

Keep private file routes on the origin. Cache the public files directory only.

Will this help a Drupal Commerce store?

Yes for catalogue, media and anonymous pages. Keep cart and checkout dynamic, as with other commerce platforms.