Support » Plugin: W3 Total Cache » How to exclude some pages from CDN/Caching

  • Resolved hlwinkler



    I am using W3TC (happily installed the hotfix this morning) and I have one issue, which is that I want to turn on https on my checkout page but I always get mixed ssl warnings because of images and css/js being loaded with http from MaxCDN. I would actually like to entirely exclude my checkout area from being handled by W3TC at all. Is this possible, or alternately is it at least possible to have certain pages not make use of the CDN? I’d prefer not to also set up my cert with MaxCDN because it adds complexity to my admin task and incurs another yearly cost (and I’m also not sure that the certificate I purchased will work with other domain suffixes).

    I accidentally also asked this here outside of this subforum, please feel free to delete my earlier post:

    Thank you for any assistance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Any way to do this?

    Would it be possible for the developer or someone else in the know to confirm that this is or isn’t possible?

    OK, I guess not. I did my own digging and there is an array in wp-content/plugins/w3-total-cache/lib/W3/Plugin/Cdn.php called auto_reject_uri:

    $auto_reject_uri = array(

    it looks for strings in the URL rather than a fixed path to a resource. So, for example, in my case I can prevent my WooCommerce cart/checkout/account paths from using CDN by adding the following to it:

    $auto_reject_uri = array(

    There doesn’t seem to be any kind of input anywhere which will add items to this array and the excluded files list doesn’t work for URLs, so it would be really great to have this as an enhancement.

    A couple thoughts:

    On the “Page Cache” settings page, there’s an option to “Cache SSL (https) requests” which can be turned off.

    Further down on that page is an option to “Never cache the following pages:”, which you can enter and save. This way you can avoid hacking the core, which is just going to get overridden when you upgrade.


    Thanks for the suggestion. I don’t think page caching is related to the CDN functionality. The first thing I tried was adding the pages to the “never cache” list but it had no effect. I’m aware that I’ll need to hack in this patch with every upgrade.


    I had the same trouble. You fixed it adding the pages to the array right ?

    Yup, it worked like a charm and is saving me $39 a month in CDN dedicated SSL costs. It would be a great feature for Frederick to add in a future update so it isn’t necessary to hack in after every update.

    Thanks for the reply. I did the same and it works like a charm.

    By the way, I wanted to do it for WooCommerce too :).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to exclude some pages from CDN/Caching’ is closed to new replies.