CDN Hostname for YSlow

I ran GTMetrix against one of my sites that is hosted at WPMUDEV. They report that I’m not using a CDN. Since I’m pretty sure I AM using the WPMUDEV CDN, how do I clear that up with YSlow? It’s asking for the CDN Hostname.

  • Adam
    • Support Gorilla

    Hello Jack Lavender

    I hope you’re well today and thank you for your question!

    The GTMetrix is detecting it properly actually and to clear that up you can use e.g. CloudFlare.

    Let me explain the difference :slight_smile:

    There are two CDN “options” or “tools” related to us that you can use. One is “WPMU DEV CDN” that you can enable in “Asset Optimization” in Hummingbird and the second one is “Smush CDN” – if you’re using our Smush plugin to optimize images.

    Both these CDNs are “dedicated solution”. The Smush CDN only serves optimized images and the WPMU DEV CDN is only for CSS/JS files. Only these resources are then served from CDN.

    Furthermore, there’s an additional difference that is very significant in context of GTMetrix test. Both these tools are CDNs technically speaking as whenever they get a request for a given file, they serve it – just like any other CDN – using the best end-point/route for the end-user. But they work kind of “behind” your site – only the “internal resource URLs” are rewritten to be served from CDN. A simplified explanation “flow” would be like this:

    browser request page -> your server responds -> browser sees that it must request HTML file from “yoursite.com” and CSS file from “wpmu dev cdn” -> it makes these requests -> your server responds with HTML file | wpmu dev cdn responds with CSS file

    A “regular” CDN such as e.g. Cloudflare works “in front” of your site (on DNS level) so simplified flow would be like this:

    browser requests page -> CloudFlare checks if it has what's needed in its caches and if so -> it responds (using the fastest route for the client) | for some resources that CF didn't/couldn't cache CF sends request to your server -> and the rest goes the same as in the previous example above

    That’s simplified as there are also things like e.g. browser cache and dns pre-fetching that further change that but this should give you basic idea.

    GTMetrix does see that some of JS/CSS resources are served from WPMU DEV addresses but from “test point of view” it’s just that – fetching resource from some URL. While it does help with speed, GTMetrix doesn’t consider it a CDN, unlike e.g. CloudFlare which is “in front” of the site.

    If you got any follow-up questions on this, let me know please :slight_smile:

    Best regards,

    Adam

  • Adam
    • Support Gorilla

    Hi Jack Lavender

    Your answer raises a related question: Should I also be using Cloudflare for sites hosted at WPMUDEV?

    That’s a fair question but I’ll answer this time: it depends :slight_smile:

    GTMetrix may be suggesting using CDN but it’s not a requirement. If the site’s running fine in terms of speed – and I’m referring here more to your/your visitors “subjective experience” rather than any performance tests – it should be fine without it.

    Personally, I like using CloudFlare (tho I avoid enabling their Rocket Loader, I don’t have any particularly good experience with it, but maybe it was just may bad luck…:wink: as it can sometimes really speed up things, makes performance more “equal” across the globe, ads up additional security layer and lowers the “load” on server (lowers server resource usage).

    So it’s more of a “do I feel it could be beneficial for my site performance/security” question rather than anything else, in my opinion :slight_smile: It can be used with WPMU DEV CDN/Smush CDN active and Hummingbird even has an option to connect CloudFlare to it so it would be able to clear its cache too whenever necessary :slight_smile:

    Best regards,

    Adam

  • Jack Lavender
    • The Crimson Coder

    I’ve been consultant off-and-on for years – I understand the “it depends” answer.

    In my case, almost all of my clients are US-only so the CDN isn’t really critical. I’m just trying to make sure I’m ready when I really need it. And I’m trying to balance it with the overhead associated with adding & maintaining the Cloudflare instance. It’s not a lot, but it’s something.

    Thanks again for the detailed response.

  • Adam
    • Support Gorilla

    Hi Jack Lavender

    I think in this case you might not need it, indeed. Unless/until you notice e.g. some significant drops in performance or increased resource usage. But the good thing is – even if you don’t use it now, you can always add it later (and remove as well) so there’s some “flexibility” in it :slight_smile:

    Anyway, I’m glad I could help and in case you had any additional questions or needed assistance, don’t hesitate to ask :slight_smile:

    Have a great day!

    Adam