CDN Integration and Configuration

Updated on 10. 2. 2026

Content Delivery Network (CDN) Integration

ZiziCache offers two CDN integration modes: a simple Pull CDN via URL rewriting and an optional Cloudflare API integration for edge caching controls. Both are configured in the CDN tab of the admin panel.

Two modes

  • Pull CDN (URL rewriting) – rewrites asset URLs in your HTML output to a CDN host. Works with any CDN provider and does not require API access.
  • Cloudflare API (Edge Caching) – connects to Cloudflare via API token to manage cache rules and purging from the admin UI.

Pull CDN: how it works

  • Rewrites asset URLs in the final HTML (frontend output only) during optimization.
  • Targets selected file types: all, images, CSS/JS, fonts, videos, or static.
  • Adds a for the CDN host to speed up connection setup.
  • Can also rewrite relative paths starting with / when enabled.
  • Exclusions are substring-based patterns (one per line).
  • Optional availability check uses a HEAD request to /favicon.ico; if it fails, rewriting is skipped for that request.
  • Note: ZiziCache does not upload or sync files to your CDN. It only rewrites URLs.

Cloudflare API integration

  • Connect using a Cloudflare API Token and Zone ID (Account ID is optional but recommended).
  • Test connection and display zone information inside the admin UI.
  • Edge Caching toggle creates or removes a Cloudflare Cache Rule via API.
  • Cache Rule status can be checked from the admin UI.
  • Manual purge of specific URLs is supported.
  • Emergency Failover (experimental) is available and uses a secured HTTP/CLI check that should be run by a server cron or external scheduler.

Configuration steps

  1. Open CDN in the ZiziCache admin.
  2. Enable the CDN toggle.
  3. Choose the integration type:
    • Pull CDN: Enter the CDN host (no /wp-content path), choose file types, and configure Force HTTPS, Relative Paths, Verification, and Exclusions.
    • Cloudflare API: Enter API Token and Zone ID, optionally Account ID, then enable Cloudflare Integration and (optionally) Edge Caching.
  4. Save settings.

Required Cloudflare API permissions

  • Zone Settings: Read
  • Cache Purge: Purge
  • Cache Rules (Rulesets): Edit
  • Zone DNS: Edit (required for Emergency Failover)
  • Account Settings: Read (optional, for validation)

Notes and limitations

  • CDN rewriting runs only on frontend HTML output, not in wp-admin or REST requests.
  • If verification is enabled and the CDN is unreachable, rewriting is skipped for that request.
  • For local development, forcing HTTPS can break local CDNs unless configured accordingly.

Troubleshooting

  • No rewriting: Confirm CDN is enabled, type is Pull CDN, and CDN URL is valid. Disable verification temporarily to test.
  • Mixed content warnings: Enable Force HTTPS (or ensure your CDN supports HTTPS).
  • Missing files: ZiziCache does not push files to the CDN–verify your CDN sync/origin configuration.
  • Edge Caching rule not created: Check API token permissions (Rulesets Edit is required).
What are your feelings