This tutorial explains how to connect Joomla to an origin-pull CDN with CDN for Joomla!.
Before you begin
Create an origin-pull distribution with your CDN service and configure your Joomla website as its origin. The service should provide a CDN hostname, for example:
cdn.example.com
Confirm that requesting a known file through that hostname returns the same file as the website origin. CDN for Joomla! rewrites URLs; it does not upload files or configure the CDN service.
Configure CDN for Joomla!
Step 1: Install the extension
Install CDN for Joomla! through Joomla's normal extension installer.
Step 2: Open the plugin
In the Joomla administrator, go to System > Manage > Plugins. Search for System - Regular Labs - CDN for Joomla! and open it.
Step 3: Enter the CDN hostname
Leave Site Root at / when the CDN origin points to the complete website root. If the CDN origin points to a subfolder, enter that folder instead.
Enter the hostname without a protocol, such as cdn.example.com, in CDN Domain. Save the plugin and enable it.
Check the result
Open a frontend page and inspect its source or browser Network panel. Matching local file URLs should use the CDN hostname, while the page URL and Joomla-generated HTML remain on the website origin.
Test both HTTP and HTTPS behavior relevant to your site, verify that files return the expected content type, and check fonts and other cross-origin resources for CORS errors.