Bunny CDN Quick Setup Guide
Bunny CDN has earned a solid reputation among developers for simple reasons: transparent pricing, usage-based billing with no minimum commitment, and a control panel far cleaner than most big-name CDNs. This guide walks through the complete order — register → create a Pull Zone → caching → HTTPS → DNS → connect your site → optimize — so you can go live from zero.
Why Bunny CDN
Bunny CDN is a very cost-effective CDN provider, ideal for sites with a tight budget but real performance requirements.
- Low price: from $1.40/TB with no hidden fees; traffic pricing is among the most competitive in the mainstream CDN market
- Pay-as-you-go: no minimum commitment, so even a personal site has no monthly fee threshold
- 119 global nodes: coverage across NA, EU, Asia; static assets are served from the nearest edge
- Simple UI: a control panel that's intuitive with a short learning curve
- Free SSL: automatic Let's Encrypt certificates
One caveat: Bunny CDN has no mainland China nodes. If most of your visitors are in mainland China, think twice or pair it with a domestic CDN.
Step 1: Register and Create a Pull Zone
- Register at bunny.net (email or third-party login);
- In the dashboard, click Add Pull Zone;
- Fill in the following:
Pull Zone Name: your-site (becomes part of the CDN URL, e.g. your-site.b-cdn.net)
Origin URL: https://your-origin-server.com (your origin address, domain or IP)
Type: Generic (Other)
The Pull Zone is Bunny's core concept: it pulls files from your origin and caches them at edge nodes. Make sure the origin URL is actually reachable, or the first fetch will return 502.
Step 2: Configure Caching
Cache Settings:
- Enable Cache: ✅
- Cache Expiration Time: 86400 (24 hours, in seconds)
- Override Cache Time: 0 (respect the origin's Cache-Control, and use the fallback above when the origin sets none)
Cache Processor:
- Enable Optimizer: ❌ (turn on only if you need image optimization)
Longer isn't always better: static assets (images, CSS, JS) can go 7 or even 365 days, while dynamic endpoints should be 0. Starting with a uniform 86400 and then refining by resource type is the safer path to launch.
Step 3: Configure HTTPS
SSL Settings:
- Enable SSL: ✅ (auto-provisions a Let's Encrypt certificate)
- Force SSL: ✅ (301 redirect from HTTP to HTTPS)
- Host Header: keep the default
Enabling Force SSL redirects all HTTP requests to HTTPS, avoiding the "mixed content" problem where some resources load over HTTP and others over HTTPS.
Step 4: Connect DNS
Option A: CNAME (recommended)
Add a CNAME record in your domain's DNS:
cdn.example.com CNAME your-site.b-cdn.net
Option B: Bunny DNS
Add the domain in the Bunny dashboard and let Bunny host the DNS:
Add Domain → enter example.com → note the NS addresses
→ update the domain's NS records at your registrar
Option A is more flexible (doesn't affect existing DNS); Option B gives you Bunny's Anycast DNS directly. Both work — pick based on how your DNS is hosted today.
Step 5: Use It on Your Site
<!-- Replace original resource URLs with CDN addresses -->
<!-- Original -->
<link rel="stylesheet" href="https://example.com/style.css">
<!-- CDN -->
<link rel="stylesheet" href="https://cdn.example.com/style.css">
<!-- Or replace paths directly with the Pull Zone URL -->
<img src="https://your-site.b-cdn.net/images/photo.jpg" alt="">
When you go live, replace all static resource URLs with CDN addresses and keep the origin as a fallback so you can roll back easily.
Performance: Brotli and Edge Rules
Bunny CDN dashboard → Pull Zone → Compression:
- Enable Brotli: ✅
Brotli compresses text resources (HTML, JS, CSS) on average 15-20% better than gzip. Combine it with Edge Rules to refine caching:
Edge Rules:
1. If URL contains /assets/* → Cache TTL: 365 days
2. If URL contains /api/* → Cache TTL: 0 seconds
3. If URL ends with .html → Cache TTL: 3600 seconds
Pricing Reference
Bunny's traffic pricing is essentially flat at about $0.01/GB (slight regional variation), so:
| Traffic | Estimated Monthly |
|---|---|
| 50 GB | ~$0.70 |
| 100 GB | ~$1.40 |
| 500 GB | ~$7.00 |
| 1 TB | ~$14.00 |
| 10 TB | ~$140.00 |
A personal site typically moves tens of GB per month — often under a dollar a month in CDN costs.
Notes
- No mainland China nodes: it's an overseas CDN; pair it with a domestic acceleration solution for China-facing traffic;
- First request has latency: the origin fetch takes a moment — pre-warm critical assets;
- API available: integrate into CI/CD flows to create Pull Zones and purge caches automatically, and reuse general API integration patterns;
- One-click cache purge: the dashboard's Purge feature clears stale content instantly after a release.
Reference: Bunny CDN official docs https://docs.bunny.net/
Follow this flow and a static site can usually be on the CDN within an hour. Three things matter most: the origin URL must be right, caching should be split by resource type, and SSL should always be on.