Docs

Bunny CDN

5 min readUpdated June 28, 2026

Bunny CDN is a content delivery network from Bunny.net. It works as a pull zone in front of your storage bucket, caching files at edge nodes close to your visitors and serving them faster than a direct bucket request. WP Media Cloud rewrites all media URLs to use your Bunny CDN pull zone hostname once configured.

Before you start#

You will need:

  • A Bunny.net account.
  • A storage provider already configured in WP Media Cloud with a working connection test.
  • A Bunny CDN pull zone pointed at your storage bucket’s public URL.

Bunny CDN and Bunny Edge Storage are two separate Bunny products. If you are using Bunny Edge Storage as your storage provider, the pull zone is configured as part of the storage provider setup. This document covers using Bunny CDN in front of a different storage provider such as Amazon S3, Cloudflare R2, Wasabi, or any other provider.

Step 1: Create a Bunny CDN pull zone#

Log in to your Bunny dashboard and go to CDN. Click Add Pull Zone. Configure the pull zone as follows:

  • Name — a unique name for the pull zone. This becomes part of the default CDN hostname.
  • Origin URL — the public URL of your storage bucket. For example:
    • Amazon S3: https://[bucket-name].s3.[region].amazonaws.com
    • Cloudflare R2: your custom domain or R2.dev subdomain
    • Wasabi: https://s3.[region].wasabisys.com/[bucket-name]
    • DigitalOcean Spaces: https://[space-name].[region].digitaloceanspaces.com
    • Backblaze B2: your bucket’s public URL

Click Add Pull Zone. Bunny will provision a CDN hostname in the format [zone-name].b-cdn.net.

Step 2: Configure a custom domain (optional)#

By default Bunny provides a [zone-name].b-cdn.net hostname. If you want to serve media from a custom subdomain such as cdn.yoursite.com, go to your pull zone settings and click Add Custom Hostname. Add a CNAME record pointing your subdomain to [zone-name].b-cdn.net in your DNS settings. Bunny will provision an SSL certificate automatically once the DNS record propagates.

Step 3: Connect Bunny CDN in WP Media Cloud#

In your WordPress admin, go to WP Media Cloud > Settings > CDN and select Bunny CDN. Enter your pull zone hostname — either the default [zone-name].b-cdn.net or your custom domain. Save settings.

All media URLs will now be rewritten to use your Bunny CDN hostname. Files are fetched from your origin bucket on first request and cached at the Bunny edge for subsequent requests.

Step 4: Test CDN delivery#

Go to Media > Library in WordPress, click on any image that has been offloaded, and check the file URL in the attachment details panel. It should now show your Bunny CDN hostname rather than the direct bucket URL. Open the URL in a browser to confirm the file loads.

On first load, the request travels from the Bunny edge node to your origin bucket. Subsequent requests for the same file are served from the edge cache. This first-request latency is normal CDN cold-cache behaviour.

Cache TTL and purging#

Bunny CDN caches files at the edge for a configurable time period. The default TTL is set in your pull zone settings under Caching. When a file is replaced in WordPress and you need the CDN to serve the new version immediately, you can purge the cached file from the Bunny dashboard under Tools > Purge Cache in your pull zone.

Dashboard analytics#

When Bunny CDN is configured as your CDN, WP Media Cloud’s Dashboard tab shows live statistics pulled from the Bunny API. These are the richest analytics available in the plugin — Bunny CDN is the only CDN integration that provides a full bandwidth and request dataset.

The Dashboard tab shows the following when Bunny CDN is active:

  • Files stored — total number of files in your Bunny storage zone
  • Storage used — total bytes used in your Bunny storage zone
  • CDN bandwidth — total bandwidth delivered through the pull zone over the selected period
  • Total requests — number of requests served by the pull zone over the selected period
  • Cache hit rate — percentage of requests served from edge cache rather than origin
  • Bandwidth chart — daily bandwidth breakdown for the last 7 days
  • Storage growth chart — monthly count of files offloaded from your media library over the last 6 months

Stats are cached for 15 minutes. Click Refresh on the Dashboard tab to force an immediate update from the Bunny API.

Statistics require both your Bunny API key and your Pull Zone ID to be configured in WP Media Cloud settings. If either is missing, the Dashboard will show only the local offloaded file count.

Troubleshooting#

CDN URL is not rewriting
Confirm the pull zone hostname is entered correctly in WP Media Cloud > Settings > CDN without a trailing slash and with the correct protocol (https://). Save the settings and reload a page with media on it.

CDN returns 404 for files
The origin URL in your Bunny pull zone is incorrect or the file does not exist at that path in your bucket. Confirm the origin URL in the pull zone settings matches the public URL structure of your bucket, and confirm the file has been offloaded by checking its URL in the WordPress media library.

CDN returns the wrong file or a stale cached version

Custom domain not working
Confirm the CNAME record is pointing to your Bunny pull zone hostname and that DNS has propagated. Bunny provisions an SSL certificate automatically but this can take a few minutes after DNS propagation.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only