CDN
Dotjuice → Page speed → CDN
What this tab controls
Rewriting your site's stylesheet and script URLs to point at a CDN hostname instead of your own server.
Settings
| Setting | Default | What it does |
|---|---|---|
| Enable CDN URL Rewriting | Off | Turns URL rewriting on or off. |
| CDN URL | Empty | The hostname to rewrite asset URLs to (e.g. https://cdn.yoursite.com). The plugin doesn't check that this URL is reachable or correctly configured — make sure your CDN is already set up and serving your site's files before enabling this. |
| Rewrite These Directories | wp-content, wp-includes | Only URLs containing one of these path segments are rewritten — leaves this as-is unless you have a specific reason to narrow or widen it. |
What this does and doesn't cover
This setting rewrites the URLs WordPress generates for enqueued stylesheets and scripts — the same files covered by the CSS and JavaScript tabs. It does not rewrite:
- Image URLs (
<img>tags, background images set via CSS) - Media Library files linked or embedded in post content
- Fonts referenced from inside a CSS file's own
@font-facerules
If your goal is CDN delivery for your whole media library rather than just CSS/JS, you'll need a dedicated media-offload plugin, or your CDN provider's own integration, in addition to this setting.
Setting it up
- Confirm your CDN is already configured and correctly mirroring/proxying your site (this plugin doesn't set up the CDN itself — it only rewrites URLs to point at one that's already working).
- Enter your CDN's hostname in CDN URL, including the
https://prefix. - Enable Enable CDN URL Rewriting and save.
- Clear your cache and check a page's source (or your browser's Network tab) to confirm stylesheet and script URLs now point at your CDN hostname and load correctly.
If assets fail to load after enabling this, double-check the CDN URL is exactly correct and that your CDN is actually serving the wp-content/wp-includes paths — a misconfigured CDN will show as broken styling or a console full of failed requests.