Support » Plugins » W3 Total Cache – default hostname

  • Hi,

    I have activated w3 total cache and enabled CDN. I have configured my CDN on Rackspace and have uploaded files to CDN. Although I have tried to upload all image, css, js files, there are some files that have not been uploaded.

    Also, since mine is a buddypress site, users might occasionally change their avatar or add an image. These images won’t be in the CDN until the next automatic update.

    Now, the issue I am facing is that after enabling CDN, the server looks for all image, css, js files on the CDN. Ideally, what I would like is for it to search the CDN for the files. If they aren’t found there, it should try to locate the files on my website’s server.

    Currently because all image files are being searched for on the CDN, some of the more recent one’s (avatar changes, etc) are not found.

    So, how do I configure the CDN plugin to first search for the image in the CDN server. If not found, search on my own server?

    I tried doing this with CNAME, by providing multiple hostnames. But when I do this, it always defaults to one or the other server instead of the behavior I desire. Are the hostnames not searched one by one?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Divyabh,

    On the CDN settings page, there are two separate sections:

    One to include files or directories that are not common or already included.

    One to exclude specific files or directories. To exclude anything below a directory use a /* after the directory.

    You will see a couple of these already in your settings.

    Thanks much for the very quick response. I will try that out.

    Although here is what I would have liked.
    1) I have a directory called /wp-content/uploads/avatars/
    2) Now, this directory will get a new image when someone new joins or when someone changes their avatar.
    3) So, what I would ideally like is to not exclude this directory from going to CDN. Instead, search first in the CDN. If not found, search on my server.


    Thanks once again.



    If someone changes their avatar it should automatically update it if you have the “Enable changed files upload” checked on the CDN settings page.

    I am not the developer of this plugin, only a user, but as for the CDN looking on the server if it cannot find an item. I do not think this is possible out of the box.

    It might be possible with some coding. How much I’m not sure.

    Thanks kfawcett! Your inputs were very helpful.

    If the path to the avatars is specified in the custom files path of on the CDN settings tab and auto-upload is enabled, change avatars will be found and uploaded to the CDN at the interval specified on the same tab.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘W3 Total Cache – default hostname’ is closed to new replies.