Besides QUIC.cloud and Cloudflare, LiteSpeed Cache can work with any "pull" CDN. A pull CDN fetches files from your site the first time they are requested and serves them from its edge after that. With CDN mapping, the plugin rewrites image, CSS and JavaScript URLs to the CDN hostname.
Before you start
- LiteSpeed Cache installed (see configuring LiteSpeed Cache).
- An account with a pull CDN provider.
- HTTPS working on your site (see AutoSSL).
Create a pull zone at the CDN
- In the CDN dashboard, create a pull zone with your site URL as the origin, for example
https://example.com. - Note the CDN hostname, for example
example.b-cdn.net, or add a custom hostname likecdn.example.comwith a CNAME record in your DNS zone (see DNS zone management). - Enable SSL for the CDN hostname in the CDN dashboard.
Map files in LiteSpeed Cache
- Go to LiteSpeed Cache → CDN → CDN Settings.
- Turn Use CDN Mapping on.
- Enter the CDN URL, for example
https://cdn.example.com/. - Tick Include Images, Include CSS and Include JS.
- Leave Include File Types at the defaults unless you serve fonts or other files that should go through the CDN.
- Save and click Purge All.
Note: Page HTML still comes from your server and LiteSpeed Cache; the CDN serves static files. This combination gives fast pages and fast assets without HTML caching complications.
Test it
- Open the site, view the page source and check that image and CSS URLs start with the CDN hostname.
- In DevTools Network, confirm those files load with a 200 status from the CDN.
Purging
When you change a theme file or replace an image with the same name, purge the CDN in its dashboard as well. Many CDNs offer an API key that some plugins can use; otherwise purge manually after big changes.
Troubleshooting
Fonts or icons missing
Browsers block cross-domain fonts without CORS headers. Enable CORS in the CDN settings, or add an Access-Control-Allow-Origin header for font files.
Mixed content warnings
The CDN URL starts with http://. Use https:// and enable SSL for the CDN hostname.
Compare options in QUIC.cloud CDN and Cloudflare with LiteSpeed Cache.
Frequently asked questions
Does a pull CDN cost money?
Most charge per GB of traffic. For small sites it is usually inexpensive; check your provider's pricing.
Can I use CDN mapping and Cloudflare together?
You can, but it is unnecessary. Pick one CDN for static files to keep things simple.
Will images still be optimised?
Yes. LiteSpeed's image optimisation creates WebP files on your server, which the CDN then pulls and serves.
Should I use a custom CDN hostname?
A hostname on your own domain, like cdn.example.com, looks cleaner and lets you switch CDN providers without changing URLs.
Do I need to exclude anything from the CDN?
Files that must always come from your server, such as dynamic scripts, should not be mapped. The defaults cover static files only.
