CDN for Joomla! is provider-neutral. It works with an origin-pull CDN service that gives you a hostname and can retrieve files from your Joomla website.
Service requirements
The CDN service should be able to:
- Use the Joomla website as an HTTP or HTTPS origin.
- Request the same file paths that CDN for Joomla! places after the CDN hostname.
- Serve the file types and maximum file sizes you configure.
- Preserve required query strings and return the correct content types.
- Provide HTTPS for the CDN hostname when the Joomla site uses HTTPS.
- Pass through or add required response headers, including CORS headers for fonts when needed.
A push-only service or object-storage service that requires files to be uploaded separately is not managed by this extension. Signed URLs and provider-specific cache, security, purge and origin settings must also be configured outside CDN for Joomla!.
Shared setup
- Create an origin-pull distribution, zone, resource or endpoint with the public Joomla website as its origin.
- Enable delivery over HTTPS. Restrict caching to the static file types you intend to serve through the CDN.
- Copy the delivery hostname assigned by the provider, or configure a custom CDN hostname and its certificate and DNS record.
- Request an existing image, stylesheet or script directly through that hostname. Do not continue until the file loads correctly.
- Enter the hostname in the CDN Domain field in CDN for Joomla!, without a protocol or path. For example:
cdn.example.com. - Save the plugin and verify that matching file URLs in the page source use the CDN hostname.
Provider interfaces and product names change regularly. The walkthroughs below cover only the settings that connect the provider to CDN for Joomla!. Follow the linked provider documentation for account-specific, security, caching and billing choices.
Amazon CloudFront
- Create a standard CloudFront distribution for a website or application.
- Use the Joomla website hostname as a custom or Other origin. Choose an origin protocol that your website supports.
- Configure the default behavior to cache the static assets you plan to rewrite. A Default Root Object is not required by CDN for Joomla!.
- Create the distribution and wait until deployment has completed.
- Copy the assigned hostname, such as
d111111abcdef8.cloudfront.net, and test an existing Joomla asset through it. - Enter that hostname in CDN Domain. If you use your own CDN hostname instead, configure it as an alternate domain in CloudFront with a valid certificate and DNS record first.
See Amazon's CloudFront distribution guide.
Azure Front Door
- Create an Azure Front Door Standard or Premium profile. For a Joomla website hosted outside Azure, use the custom setup path.
- Create an endpoint and origin group, then add the Joomla website as a custom origin. Use the website hostname for both the origin hostname and origin host header unless your hosting setup requires another value.
- Create a route from the endpoint to that origin group and enable caching for the static assets you plan to rewrite.
- Wait for deployment, then copy and test the endpoint hostname, such as
example.z01.azurefd.net. - Enter that hostname in CDN Domain. Configure the certificate and DNS validation in Front Door before using a custom CDN hostname.
See Microsoft's Azure Front Door portal guide.
Bunny CDN
- Create a Pull Zone.
- Set Origin URL to the public URL of the Joomla website, including
https://. - Save the zone and copy its default hostname, such as
example.b-cdn.net. - Test an existing Joomla asset through that hostname, then enter it in CDN Domain.
- If you use a custom hostname, add it to the Pull Zone and complete its DNS and SSL configuration first.
See Bunny's CDN quickstart.
CDN77
- Create a new CDN Resource and select Your Origin.
- Use the public Joomla website domain as the origin.
- Create the resource, then use its Integration area to find the assigned delivery hostname.
- Configure SSL before using a custom CNAME. Test an existing Joomla asset through the hostname you intend to use.
- Enter that hostname in CDN Domain.
See CDN77's CDN Resource guide.
CDNetworks
- Activate Content Acceleration and add a new domain in the CDNetworks console.
- Use a dedicated CDN hostname, such as
cdn.example.com, as the domain to accelerate. - Select Bring Your Own Origin and enter the public Joomla website hostname as the origin domain.
- After activation, point the dedicated CDN hostname to the CNAME address assigned by CDNetworks. Enable HTTPS for that hostname.
- Test an existing Joomla asset through the dedicated hostname, then enter it in CDN Domain.
See CDNetworks' Content Acceleration domain guide.
CacheFly
- In the CacheFly control panel, configure a service that uses the public Joomla website as its HTTP or HTTPS origin.
- Set the origin host header to the Joomla website hostname when your web server uses name-based hosting.
- Use the assigned CacheFly delivery hostname, or configure a custom hostname with its DNS record and SSL certificate.
- Test an existing Joomla asset through that hostname, then enter it in CDN Domain.
See the CacheFly documentation. Access to the setup documentation may require signing in to the CacheFly control panel.
KeyCDN
- In Zones, add a zone and select Pull as the zone type.
- Set Origin URL to the public URL of the Joomla website, including
https://, then save the zone. - Copy and test the assigned Zone URL.
- Enter its hostname in CDN Domain. If you use a custom CDN hostname, configure its CNAME and SSL certificate first.
See KeyCDN's Pull Zone guide.