Just ramping up a new, fairly large & file rich, site with expressionengine and a recent article by metaq touched on cdn and was wondering how one would go about setting it up.
We wouldn't be looking to hook up with amazon and the like, purely 1 or 2 subdomains, ie. mainsite.com resources.mainsite.com library.mainsite.com
I realise all content actually lives on the parent server and is held in domain folders.
Has anyone done this ? Is there significant gains to be had and what are the caveats when using modules like assets, file manager and bootstrap configs.
To add a subdomain only Choose your app that you want to add a subdomain to. In the navigation pane, choose App Settings, and then choose Domain management. On the Domain management page, choose Add domain. For Domain, enter the name of your root domain and then choose Configure domain.
A subdomain is, as the name would suggest, an additional section of your main domain name. You create subdomains to help organize and navigate to different sections of your main website. Within your main domain, you can have as many subdomains as necessary to get to all of the different pages of your website.
Having an unnecessary subdomain spreads your SEO efforts across two sites instead of focusing on one. This means it could take double the links and content to get the same results if you simply focused on one domain. The consequences can be even worse if you have a blog on a subdomain.
A subdomain can be great for SEO, but it will require a dedicated person or team that can manage it. Unlike subdirectories, a subdomain's domain authority won't automatically trickle down from the primary domain name.
I realise all content actually lives on the parent server and is held in domain folders.
It sounds to me as though you're not clear on the concept of CDNs. A true CDN is a global network of servers which is optimised for performance serving static files. When files are requested a user will receive a copy from the server closest to them, minimising latency.
A step down from that would be to use a more basic storage network like Amazon S3. When you upload a file to S3 it remains in a specific datacentre, rather than being distributed globally, so performance is worse. Although you won't necessarily see a performance boost from files uploaded to S3 vs your server, you can drastically reduce the load that your server has to deal with. Imagine you have a page with 30 images and 5 CSS & JS files. All of these could be hosted on a service like S3. Instead of your server having to process all of those requests when someone loads a page it only has to worry about the page markup itself. If your site has a large amount of traffic generating a lot of load, this can be the difference between staying up or going down.
Now if you simply serve your static files from a subdomain that's running on the same server as your site, you aren't going to see any benefits. All of the requests are still being routed through the same server - you are only making an aesthetic change.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With