Speed up your MODX website

Connection MODX website to CDN is done using a third-party plugin from GitHub

7 days free

The cdnnow! staff are not experts in MODX CMS or the authors of the plugin described below. We provide the settings for connecting a CDN only as a recommendation and cannot fully guarantee that the instructions are accurate, as the plugin is updated and modified by its authors.
We found instructions in internet howto from cdnsun company. You can use it to connect our CDN, as well as any other.

Creating a CDN Account

If you don't yet have a cdnnow! account, submit a CDN activation request, by providing your email, website, and CMS.

You will receive an email with access to your Control Panel and a default CDN address for your project in the format userXXXXX.nowcdn.co or userXXXXX.clients-cdnnow.ru, where userXXXXX — is your unique identifier.

Connecting MODX to CDN

  1. Before making the suggested changes, we recommend that you create a backup copy of your site.
    The suggested changes will require you to make changes to the code written in PHP.
  2. You can connect your domain to CDN instead of userXXXXX.nowcdn.co according to the instructions.
  3. In the MODX manager, select «Elements» — «Plugind» — «New plugin»
    CDN configuration
  4. Name the new plugin, for example «CDN».
  5. In the «plugin code» field enter the code from https://github.com/CDNsun/modx-cdn-plugin (plugin.php file).
  6. In the plugin code in the __construct method replace the value of _cdnServiceUrl with the address of your CDN domain (either service domain userXXXXX.nowcdn.co, or your own cdn.example.com).
  7. Go to «System Events» tab and enable the plugin for the OnWebPagePrerender event.
  8. Click «Save».
  9. All done!

Checking the site's functionality after connection

Clear the MODX cache («Cache Management» → «Clear Cache»).

View the page source code (Ctrl+U) and make sure that links to static resources (CSS, JS, images) point to your CDN domain.

Having problems with custom fonts?
In your personal account at selfcare.cdnnow.pro in the project settings, set the value to * in the «Access» tab for the Access-Control-Allow-Origin field.
Save and publish your project
Validate the website display again.

We wish you fast website loading!

See also:

Cost of CDN services

We provide a free 7 days trial for all our new clients. When you get access to your personal account you also get unlimited access to CDN and image optimization features. During the trial period, you can thoroughly test the download speed; we do not limit the functionality for trial accounts.

If you like our service and are ready for long-term cooperation, we will convert your account from trial to normal.

The cost of placing data in CDN depends on the amount of traffic. You can check your traffic usage during the trial period in your personal account in the “Statistics” section and calculate how much traffic is expected per month. In this section, you can see the volume of requests for image optimization, if you have enabled this feature.

Prices

Traffic-Based CDN

Starting at $8/month — includes
1000 GB. Unlimited projects

Monthly Traffic Cost per 1 GB
First TB $0.008
Next 10 TB $0.020
Over 10 TB on request
from $8 / month
Cost Calculator

Minimum monthly prepayment of $8. Includes 1000 GB of traffic. Excess usage is billed postpaid on a tiered pricing model. Enter your monthly traffic volume in gigabytes. 1 TB = 1000 GB.

GB
1000 10 000
$8 / month
Image Optimization

Each plan includes up to 100 000 optimization requests per month

free 100 000 requests

then $1.12 / 10 000 requests

If you have any questions about setup, maintenance, or pricing, you can always contact our support team:

We use cookies to improve your experience on the website.