skip to content
  • How to integrate a CDN with W3 Total Cache

    by on March 13, 2012 12 Comments

    The integration of a Content Delivery Network (CDN) into your website remains one of the easiest and most cost-effective ways to improve web performance. W3 Total Cache supports several CDN types (self-hosted, origin pull, and origin push) and makes the integration into WordPress simple.

    In this post, I’ll show you how to integrate MaxCDN’s origin pull CDN product into W3TC. MaxCDN’s product remains one of the most commonly used CDNs in W3TC because it’s both affordable, simple to set up, and requires virtually no maintenance once integrated.

    MaxCDN configuration steps

    First, create MaxCDN account if you haven’t already. When you log in, click “Manage Zones”

    Then click “Create Pull Zone”

    Configure your new Pull Zone and then click “Create”

    Make a note of your CDN URL, which we’ll use in a moment

    We could technically integrate our CDN now, but W3TC can communicate with the MaxCDN (allowing purge requests to be sent directly from WordPress) if we set up the API connection.

    Click “my settings” in the top-right corner

    Click “API” in the sub-menu that appears

    You’ll notice that we don’t have any API Keys configured. Click “Add Key”

    Add a description if you’d like and then click “Save”

    Your API ID and Key will appear here, I’ve removed my Key from the screenshot

    That’s all we need to do in MaxCDN right now. In the next section, we’ll configure W3 Total Cache using the pull zone we just created.

    W3 Total Cache configuration steps:

    Once logged into WordPress, navigate to the W3 Total Cache by clicking on the “Performance” tab towards the bottom of your Dashboard sidebar. From the General Setting page, ensure that CDN is disabled and select “NetDNA / MaxCDN” from dropdown menu

    Navigate to the CDN Settings. Enter your API ID and Key, your CDN URL, and click “Test NetDNA”

    You should see “Test passed” in green if you’ve done everything correctly. Save your settings and then navigate back to the General Settings page. Enable the CDN by clicking the check box and saving your settings.

    Power user tip #1: Configure a subdomain like so we can get rid of long MaxCDN URL. W3 Total Cache lets you configure multiple CDN subdomains, so we’ll go ahead and configure a few.

    Log back into MaxCDN and from the dashboard, click “Manage” next to the Pull Zone you created:

    Then click “Settings” right above the Zone Configuration

    You’re presented with an overview of your Pull Zone settings

    The section we want is labeled Custom Domains. Click “Edit” and enter your desired subdomains

    Click “Update” and then navigate to your DNS control panel. Create a CNAME entry for every subdomain that you entered in MaxCDN, and alias them to your MaxCDN URL

    Once DNS propagates, you can update W3TC with the subdomains and replace the long CDN URL with the new, custom ones

    Power user tip #2: We can further improve page loads speeds by using a completely different domain for the CDN, ensuring that the domain is cookie-free. So if your site is, you could set as the domain to use with your CDN. Note: this assumes that you own and have access to its DNS control panel.
    That’s it! If you have any issues getting it working, drop us a line. If you’d like us to set this up for you, we’re happy to help.

This entry was posted on Tuesday, March 13th, 2012 at 8:00 am and is filed under W3 Total Cache. You can follow any responses to this entry through the RSS 2.0 feed.

  • by Jeff Costa
    on March 14, 2012 at 5:20 pm

    Willie: any notion why W3 Total Cache doesn't have Akamai as a CDN choice?

    • by willieljackson
      on June 6, 2012 at 11:23 pm

      The items in the dropdown represent CDNs where we've seen customer demand. This isn't to say that Akamai CDNs can't be integrated, there just isn't currently an API connector to it in W3TC.

  • It is nice that you have educated lpepoe on _what_ a CDN is. It is usually much easier to implement than lpepoe think and posts like this point that out.The problem I have is I am not sure what this post is actually reviewing. Are there any metrics that you have before and after? Did you enjoy the integration (origin storage setup)? Was the support helpful?Most importantly did you compare this service to any of the other providers (highwinds, edgecast/gogrid, amazon, limelight, akamai). If so, what was your basis for comparison that made MaxCDN the best choice.This post would be very useful for lpepoe who are trying to evaluate CDN’s and make recommendations to decision makers if it included some more basis and comparison.I guess when the price is only $40/mo it’s not really going to make a huge difference which one you pick.

    • by willieljackson
      on June 6, 2012 at 11:26 pm

      There is plenty of documentation on the web around what A CDN is, this post walks through how to integrate one into W3 Total Cache. It's not meant to be a review of MaxCDN.

      Also, it's not $40 per month, the deal is $40 for the initial terabyte of service — that lasts some customers months (or longer) depending on traffic and bandwidth usage.

  • Thank you Willie, great tutorial.. I was looking for such one since ages :) have a quick question though.. when the item are cached does it still consume bandwidth..
    thanks again

    • by willieljackson
      on June 6, 2012 at 11:27 pm

      CDN integration won't completely stop bandwidth usage on the origin server, but it will reduce it. Not everything is served from the CDN, of course.

  • Hi Guys,

    that is a great detailed description. Probably the best one on the net. Well done.
    However I have few questions:

    1. When you add the CNAMEs on the right side of the text box it says: "reserved for…" What does it mean, does it have any importance?

    2. I have a MaxCDN account, and I did setup everything properly and the testing passed too. So everything seams to be OK, but when I tested my site on or on or any other site it told me that the CDN is not detected.

    I contacted MaxCDN and they checked everything including my WP from admin dashboard. Their conclusion was, that the W3TC plugin does not work because my WP installation is not in root folder. Is it possible. I would love to use your plugin, but keep my WP safe and one of the steps is to do not install WP into root.

    Iam getting very good speed test and only 2 things are keep me from 100 procent: CDN usage and cookie free domain. I have VPS and full controll. What could I do?

    Many thanks

  • Wow guys, thanks a lot. Just do it on my web site. Thanks for the guide!

  • Great step by step instructions …Thanks.
    Can we use any CDN using W3 total cache.

  • Great step by step instructions …Thanks.

  • Very good illustrated guide, Thanks a lot. My questions may come later :)

Comments are closed.
February 7, 2011 97

Optimize the Performance of Widgets, Buttons & More

Too much 3rd Party content can slow down the growth of your site, reduce engagement, conversions and more. Learn how you can still incorporate widgets, plugins etc and still have a site that does not force your visitors to leave and never return.

March 9, 2009 81

Do's and Don'ts to Improve Google Ranking

Google Ranking Factors, The Good and the Bad. There are lots of opinions on how Google actually ranks your web site in the search result pages — take a closer look at what matters and why.

February 25, 2008 90

Get Your Blog Google Ranked in 30 Days or Less

Blogs are great for updating content quickly, creating a site community, and they even make search engines happy. Unfortunately, many site owners mis-use or under-utilize their blogs so here are 50 tips to boost your blogs performance.



We gave W3 MARKUP a website with more than 70 unique pages and a variety of layouts and asked them to put the whole thing into a custom WordPress theme. W3 MARKUP didn't miss a single detail and even wrote custom functions to make the future management of the site easier on us. Throughout the entire process, they were courteous, attentive, and always willing to do whatever we asked to ensure that we were 100% satisfied with their work. Outstanding job, I'd work with them again in a second.

Blake Stuchin, Access Capital