Disable Fastly CDN caching in AEM as a Cloud Service

Fastly is always part of the content delivery path in AEM as a Cloud Service and cannot be removed. Unexpected caching occurs whenCache-Control or Surrogate-Control headers are missing, overridden, or inconsistently applied across resources. In environments that use a customer-managed CDN, incorrect forwarding headers can also affect cache behavior and redirect handling.

To resolve the issue, configure cache-control headers correctly, validate CDN settings, and verify Fastly pass-through behavior.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service (AEMaaCS)
  • Bring Your Own CDN (BYOCDN) deployments
  • Dispatcher configurations
  • CDN configuration using cdn.yaml

Issue/Symptoms

  • Fastly x-cache header shows MISS or SYNTH when cache bypass is expected.
  • Fastly caches specific file types despite configured cache-control headers.
  • Surrogate-Controlor Surrogate-Key headers don’t appear at the edge.
  • Personalized content displays inconsistent behavior because cached fragments are reused.
  • Unexpected redirects occur when requests pass through multiple CDN layers.

Cause

Fastly is an integral component of the Adobe Experience Manager as a Cloud Service delivery architecture and remains in the request path at all times. Fastly caches content when Cache-Control or Surrogate-Control headers are missing, incomplete, overridden, or applied inconsistently across resource types. Some asset types, such as.vtt files, require explicit cache-control rules. In BYOCDN deployments, incorrect X-Forwarded-Host orX-Forwarded-Protoheaders can create different cache keys, resulting in unexpected caching or redirect behavior.

Resolution resolution

Follow these steps to resolve the issue

  1. Review the response headers and verify that Cache-Control and Surrogate-Control appears on affected responses.
  2. Confirm that Surrogate-Control contains values such as max-age=0 or no-store that prevent Fastly caching.
  3. Update the Dispatcher virtual host configuration so thatCache-Control and Surrogate-Control headers are applied consistently across HTML, JSON, assets, and other resource types. Add explicit rules for resource types that don’t inherit the required headers.
  4. Verify that the customer-managed CDN doesn’t override Fastly cache-control directives.
  5. Review CDN logs and confirm that the customer-managed CDN performs caching while Fastly operates in pass-through mode.
  6. Configure cache bypass in cdn.yaml if header-based controls don’t achieve the expected behavior. Deploy the updated configuration through Cloud Manager and verify that deployment completes successfully.
  7. Validate multi-CDN routing by confirming that the original Hostheader andX-Forwarded-Protoheader are forwarded correctly throughout the CDN chain.
  8. Review fragment caching implementations and ensure that personalized fragments aren’t cached.
  9. Verify that dynamic responses return the appropriate non-cacheable headers.
  10. Configure Surrogate-Key headers when purge workflows rely on key-based invalidation.
  11. Enable Fastly debugging and verify that surrogate keys appear in the response headers.
  12. Validate the final configuration by confirming that Fastly returns PASS, that the customer-managed CDN caches as expected, and that cache purge operations behave correctly.
recommendation-more-help
experience-cloud-kcs-help-kbarticles