Features
CDN Integration
A Content Delivery Network (CDN) serves your static assets — CSS, JavaScript, images, fonts, and videos — from servers geographically closer to your visitors. This reduces latency and speeds up page loads for visitors far from your origin server.
How it works
The plugin rewrites URLs for static assets to point to your CDN hostname. For example:
- Original:
https://yoursite.com/wp-content/uploads/photo.jpg - Rewritten:
https://cdn.yoursite.com/wp-content/uploads/photo.jpg
The CDN pulls the file from your origin server on first request, caches it at edge locations worldwide, and serves subsequent requests from the nearest edge server.
Key settings
Enable CDN
Master on/off switch for CDN URL rewriting.
CNAME(s)
Your CDN hostname, provided by your CDN provider. Examples:
- Cloudflare: (automatic — use the Cloudflare add-on instead)
- BunnyCDN:
your-site.b-cdn.net - KeyCDN:
your-zone.kxcdn.com - StackPath:
your-site.stackpathcdn.com - Custom:
cdn.yourdomain.com
Enter one CNAME per line if your CDN provides multiple edge hostnames.
HTTPS
Serve CDN assets over HTTPS. Enable this unless your CDN does not support HTTPS (all modern CDNs do).
Asset Types
Choose which file types to serve through the CDN:
- CSS: Stylesheet files
- JS: JavaScript files
- Images: jpg, png, gif, webp, svg, ico
- Fonts: woff, woff2, ttf, eot, otf
- Video: mp4, webm, ogv
Enable only the types your CDN is configured to serve. Most CDNs support all types by default.
Exclusions
List specific file paths or URL patterns that should not be served through the CDN. Enter one per line. Common exclusions:
- Files that must be served from your origin domain (e.g., verification files)
- Files that change frequently and should not be cached at the edge
- Third-party assets already served from another CDN
Compatibility with add-ons
If you use Cloudflare, use the Cloudflare add-on instead of the generic CDN settings. Cloudflare automatically handles URL rewriting at the DNS level, so CNAME rewriting is unnecessary and can cause conflicts.
Troubleshooting
Assets are not loading after enabling CDN. Verify your CDN is configured to pull from your origin domain. Check that the CNAME is correct and the CDN is active. Temporarily disable the CDN to confirm the issue is CDN-related.
Some assets are not being rewritten. Check the asset type settings. If you've enabled CSS and JS but not images, image URLs will not be rewritten. Also check the exclusions list.
My site looks broken on HTTPS. Ensure your CDN supports HTTPS and the SSL certificate covers your CDN hostname. Enable the HTTPS setting in the CDN tab.
I'm using Cloudflare — should I use this? No. Use the Cloudflare add-on instead. Cloudflare operates at the DNS level and automatically proxies all traffic. CNAME rewriting is unnecessary and can cause redirect loops.