RocketCDN
RocketCDN is WP Rocket's custom content delivery network. It's an add-on found in the Content Delivery tab.
Using RocketCDN will help improve the loading time of your website for visitors that are far away from where your origin server is located. Also, on sites with high traffic, the CDN will help reduce the load of the origin server.
You can activate the RocketCDN add-on directly from the Content Delivery tab in WP Rocket, using the UPGRADE NOW button for the pro plan or the ADD PAGE button for the free plan.
Feature overview
As pages receive visits, RocketCDN will start storing the page assets in the Points of Presence (PoPs). The assets are the fonts, images, JavaScript, CSS, and documents of a page, and the PoPs are the servers in a globally distributed network.
This way, the next time a page gets a visit, the assets will be served from a closer location instead of the origin server, improving the loading time of the page.
This is the process that follows the activation of the RocketCDN add-on:
- Automatic creation of a unique
delivery.rocketcdn.meCNAME for your website.
Note: We do not offer customized CNAMEs, e.g.cdn.yourdomain.com(please check the FAQ article). - Automatic configuration of the optimal performance settings for assets served from RocketCDN:
- Apply GZIP compression
- Apply CORS headers for webfont compatibility
- Set a
cache-controlbrowser cache header - Set canonical headers
- Serve assets over HTTP/2
Fonts, images, JavaScript, CSS, documents, and all other cacheable elements will be automatically served from your RocketCDN CNAME.
Also, it is not possible to use more than one CNAME with RocketCDN.
RocketCDN free plan
The RocketCDN free plan is included with WP Rocket, and it has the following features:
- Up to 3 pages.
- 10 PoPs are included.
- Unlimited bandwidth.
We reserve the right to disable your RocketCDN URL if we detect bandwidth overuse. - All CDN files are automatically served over HTTPS.
- SSL traffic included.
PoP locations:
- America: São Paulo, Chicago, Dallas, Los Angeles, and Miami
- Asia: Hong Kong, Singapore, and Tokyo
- Europe: Frankfurt and Paris.
RocketCDN pro plan
The RocketCDN pro plan provides these increased benefits:
- Unlimited pages.
- All Global PoPs are included.
- Unlimited bandwidth.
We reserve the right to disable your RocketCDN URL if we detect bandwidth overuse. - All CDN files are automatically served over HTTPS.
- SSL traffic included.
Exclude pages from RocketCDN
If needed, you can use the Exclude Pages from CDN box to prevent the assets of a page from being served by RocketCDN:
This option is only available in the pro plan of RocketCDN because this is the only plan that covers all the site pages by default.
Exclude files from RocketCDN
If you're experiencing issues serving specific file types through the CDN, you can exclude those files with the Exclude Files from CDN box:
You can exclude them by setting their specific filenames or by setting wildcard patterns:
- JavaScript files:
/(.*).js - CSS files:
/(.*).css - Images:
/(.*).jpg,/(.*).png,/(.*).webpor/(.*).svg - PDFs:
/(.*).pdf
When should I purge the RocketCDN cache
If you have changed a static file without changing its filename, for example, replacing an image while keeping the same URL, visitors may continue receiving the old cached version from RocketCDN.
In this case, use the CLEAR ALL ROCKETCDN CACHE FILES button to replace the existing files of RocketCDN with their updated versions:
Why isn't RocketCDN available on local/staging?
RocketCDN requires a live website to work correctly, so it's not available on local sites.
The subscription is unique to your domain, so you cannot use the same RocketCDN subscription on multiple domains. Therefore, RocketCDN will not be available on the staging version of your site.
Using RocketCDN in production/staging setup
Each individual RocketCDN subscription can only be used on a single domain. This can create issues when you sync a production site that has RocketCDN to a staging site that doesn't have it.
The staging site will try to load assets from the CDN URL, but the assets will fail to load because the CDN URL is assigned only to the production site domain, not the staging site domain.
To solve this issue on the staging site, you should use the PAUSE CDN button:
It is also possible to programmatically turn off RocketCDN on the staging site when you synchronize it with the production site via PHP using our function:
update_rocket_option( 'cdn', 0 );
For example, this function can be used in combination with our other functions to clear the cache and preload the whole site using a CRON job, as explained in the document How to clear cache via cron job:
<?php
// Load WordPress.
require( 'wp-load.php' );
if ( ! function_exists( 'rocket_clean_domain' ) ) {
return;
}
// Disable Content Delivery option
update_rocket_option( 'cdn', 0 );
// Clear cache and preload (if enabled).
rocket_clean_domain();
// Clear minified CSS and JavaScript files.
rocket_clean_minify();




