Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've done some research about CDN or Content Delivery Network for self-hosted Wordpress site like mine it's recommended to have this implemented because it can help if you get load of traffic to your site.

To my question, should CDN be hosted in the same domain, but in a different directory? Or is it recommended to be hosted entirely in a different server?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

CDNs work best when the objects - images, scripts - are hosted on a completely different server. Hosting a CDN on the same box that holds your web site defeats the purpose, as the processor, RAM and bandwidth are already being used for the site, and even if the CDN is on a subdomain, your server is still being used.

Try WP Super Cache with a Amazon Cloudfront CDN (You don't have to set up an S3 bucket; just use Cloudfront.)

Super Cache is less .htaccess intensive and more foolproof than W3TC. Follow WP Super Cache's instructions to add an .htaccess file to the cache folder for full browser caching.

Use to test site speed and caching.

share|improve this answer
Thanks I will try your suggested answer :) – Ali Mar 28 '12 at 1:31
If you're serving it off a cookieless subdomain, there's also an improvement. Just worth mentioning. – kaiser Nov 21 '12 at 21:16

That's true, a self hosted CDN allows you to load other contents in parallel, instead of loading contents one by one. I have used this method, and while it does work, I think if you can afford paid Content Delivery Networks, then go with them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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