I'm currently researching ideas for the media management side of a CMS I'm writing. I was looking at having images served from a CDN which is fine on a single site, but I want all sites that run the CMS to make use of a CDN (which will most likely be a custom developed one, rather than a third party service like S3).

My main question is: Is a multi-site CDN a good idea? I can't think of a downside, but have probably missed something - obviously they won't share the same folder, as I invisage the requests to be css.cdnsite.com/example.com/style.css or something along those lines. Having multiple sites in the same place will obviously make it easier for us to manage, as well as being cheaper, but then I wonder if it'll be worth it...

Long story short: How should the CMS handle user uploaded media (separate installations)

Just keep a local copy of all assets and serve them from the same site, like in days of yore?

Keep a local copy, force site to use www. and have CDN subdomains per site?

Or use a single separate CDN for all sites?

Apologies for the length of this question, not sure if this should be multiple questions or not, as all parts are kind of related and could affect each other.

1 Answer 1


While sharing containers across multiple sites isn't a huge problem its less than ideal for administration purposes. It should be just as easy to create multiple containers for each of the sites rather than creating multiple folders within one container.

Also many people use cdn.branding.com to look nice while this isn't a major problem its worth noting there's nothing wrong with using the url's issued by the CDN for example L922921.rackspace.cdn.com in fact its best not to use a custom domain if you want cutting edge speed since by using a custom domain your adding an additional DNS lookup which can unessacary add to page rendering.

Additionally I noticed your using css.domain.com and I assume your might use image.domain.com for the images, while this looks neat - it's a mistake by many, more cdn's means more lookups meaning less speed so my advice would be to use 1249124a.rackspace.cdn.com/css/example.css and use the same container but with a sub folder for other contents such as: 1249124a.rackspace.cdn.com/images/myimage.jpg. If this isn't planned by you then simply ignore this part and it'll make a good read for others.

Going back to your original question about using multiple sites within one container the other thing to look at is that your allowing all sites to have access to the same container and this could cause problems if your using the API since one change could do something unintended to the files and folders of other sites, so again my personally opinion is that you should keep them separated and using the API correctly it makes no extra work other than adding them differently in each of the sites to begin with.

  • Thanks for the reply. Just to clarify - I'm not planning on using any third party CDN (no API involved). The whole lot is custom. Hadn't thought of the extra DNS lookups for asset specific subdomains - will scratch that idea. The reason I am looking into a custom CDN is so that I can do on-the-fly image resizing, security/protection, manage multiple sites from one CDN, etc. If this sort of customisation is available with third party CDNs I will certainly consider it though as the sharing of assets around the world will be advantageous
    – MDEV
    Sep 10, 2013 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.