Title: CDN on Multisite
Last modified: January 17, 2017

---

# CDN on Multisite

 *  [jstallard](https://wordpress.org/support/users/jstallard/)
 * (@jstallard)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/)
 * How do you configure CDN on the main blog of a multisite?
 * I can’t create a CNAME record for the CDN because you can’t create a CNAME on
   a root domain. That’s against the DNS protocols.
 * I can’t allow the CDN to run my DNS because my name servers are authoritative
   for all my clients’ domains – they map their domains to their websites on my 
   server. My root domain is webhive.com.au and there are quite a few websites using
   subdomain.webhive.com.au.
 * Am I missing anything, or is it impossible to run CDN on the main blog of a multisite?
 * Thanks
    Jackie

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [jstallard](https://wordpress.org/support/users/jstallard/)
 * (@jstallard)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8671327)
 * The CDN I’m trying to configure is Cloudfront. Cloudfront says:
 * > Amazon Route 53 automatically creates a name server (NS) resource record set
   > that has the same name as your hosted zone. It lists the four name servers 
   > that are the authoritative name servers for your hosted zone. Do not add, change,
   > or delete name servers in this resource record set.
 * If I did that, all my clients’ domain mappings would break.
 * The only way I can see to get this to work is if I use the Cloudfront distribution
   name, duzjoog605274.cloudfront.net for my website, which would then appear in
   my URLs. I don’t want to do that!
 *  [jkhongusc](https://wordpress.org/support/users/jkhongusc/)
 * (@jkhongusc)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8682531)
 * I dont think you’ll get much help here. You are asking complex questions on specific
   services: DNS/R53, WP multisite, and CF.
 * After reading your posts a couple of times, I still do know what you want. What
   exactly are you trying to achieve?
 * If you want to use a CDN, what are you storing on your CDN – assets only or WP
   content too? It gets really complex when you want the CDN to serve content. Typically
   people store assets (like media) in their CDN via WP plugin; and they use the
   CDN’s url to achieve this easily.
 * Are you really running WP from an apex domain name like domain.com? Or does WP
   redirect to [http://www.domain.com](http://www.domain.com) (another common configuration).
   Having your CDN use an apex domain requires either special DNS or CDN configuration.
   As an alternative you might want to consider using a subdomain, e.g. assets.domain.
   com.
 *  Thread Starter [jstallard](https://wordpress.org/support/users/jstallard/)
 * (@jstallard)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8684027)
 * Hi jkhongusc
 * I’m trying to get my website to load in under 2 seconds. To achieve that, I’d
   like to store everything on a CDN.
 * My website is webhive.com.au. (No www).
 * I considered cloning webhive.com.au (the main blog on my multisite) to another
   multisite blog, let’s say origin.webhive.com.au and using that as the origin 
   server for the CDN.
 * I guess the cdn distribution needs a different name again, say cdn.webhive.com.
   au. So cdn.webhive.com.au would copy the content from origin.webhive.com.au and
   serve that up. I’d need to ask search engines not to index origin.webhive.com.
   au.
 * All my marketing says webhive.com.au. I suppose I’d need to 301 redirect all 
   webhive.com.au URLs to cdn.webhive.com.au.
 * Does that sound like it’ll work?
    Thanks!
 *  [jkhongusc](https://wordpress.org/support/users/jkhongusc/)
 * (@jkhongusc)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8695125)
 * Your WP has webhive.com.au setup as the main blog… which is also the url which
   your marketing material uses. Unfortunately CF cannot use webhive.com.au. Yes,
   you will need a different hostname for CF. I personally wouldnt recommend cdn.
   webhive.com.au. I recommend [http://www.webhive.com.au](http://www.webhive.com.au)
   as that is the standard. You can easily set a redirect from webhive.com.au to
   [http://www.webhive.com.au](http://www.webhive.com.au) either at the DNS level
   or on your web server. Additionally you will need to set your [http://www.webhive.com.au](http://www.webhive.com.au)
   dns (alias) to the cloudfront url. This was the easy part.
 * The harder part is that you need to configure one of your WP subsite as [http://www.webhive.com.au](http://www.webhive.com.au).
   Unfortunately, AFAIK, you cannot have your main WP multisite map to a different
   hostname. Any WP subsite can be named to any hostname. You will need to find 
   a plugin that will duplicate your main site to a subsite. Then you need to create
   an CF origin that points at your WP server…you need to figure out what hostname
   to resolve to your WP site (webhive.com.au would probably work). You will need
   to customize your behavior to pass the Host header to your origin. Did you understand
   all that? Like I said, its hard and complex. I left out details but that is the
   gist of it.
 * BTW, the reason why I know all about this is that I am using CF to front my WP
   multisite server and doing almost the exact thing.
 *  Thread Starter [jstallard](https://wordpress.org/support/users/jstallard/)
 * (@jstallard)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8700192)
 * Hi jkhongusc
 * Ok, it’s working!
 * Yes you’re right, you can’t map your main WP multisite domain to another hostname.
 * I’ve set up my Cloudfront CDN distribution as ecommercewebsitedesign.webhive.
   com.au. Not the prettiest URL, but it contains my key words and should work.
 * I used the Multisite Clone Duplicator to copy the webhive.com.au to a blog on
   the multisite (origin.webhive.com.au). That’s now my Cloudfront origin.
 * I replaced WP Super Cache with W3 Total Cache to optimise origin.webhive.com.
   au and spent 2 days fiddling with the settings. W3 Total Cache sped my site up
   by a factor of four!
 * W3 Total Cache handles a lot of the difficult stuff. The settings allow Cloudfront
   to host images, CSS, Javascript, page content etc. W3 Total Cache updates the
   links automatically.
 * All good and now the site’s a lot faster!
 * Thanks!
    Jackie

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CDN on Multisite’ is closed to new replies.

## Tags

 * [cdn](https://wordpress.org/support/topic-tag/cdn/)
 * [dns](https://wordpress.org/support/topic-tag/dns/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 5 replies
 * 2 participants
 * Last reply from: [jstallard](https://wordpress.org/support/users/jstallard/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/cdn-on-multisite/#post-8700192)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
