Support » Plugin: Autoptimize » My site breaks when using CDN

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Assuming www.cdn.subdomain.domain.com/wp-content/cache/autoptimize/index.html works, you should either enter

    http://www.cdn.subdomain.domain.com if your site is not on HTTPS or
    https://www.cdn.subdomain.domain.com if your site is on HTTPS or
    //www.cdn.subdomain.domain.com which should work for both

    hope this clarifies,
    frank

    I tried both, without luck. I wonder whether one needs to define a CNAME for the cdn (I read somewhere explaining about autoptimize)

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, did you confirm this part?

    Assuming http://www.cdn.subdomain.domain.com/wp-content/cache/autoptimize/index.html works

    No it does not. It shows 404. I emptied both the cache, AO and cache plugin

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No it does not. It shows 404.

    in that case your problem is not with Autoptimize or AO config, but with your CDN settings I’m afraid @ghitorni, check CDN URL and the settings at your CDN provider.

    I am not using any CDN. I created the sub-subdomain as my CDN url and thought AO will utilize it. Earlier, I even tried using CDN-enabler plugin, put the url there too, but still the site broke.

    Hence I thought there must be something wrong in my approach, I came here.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    so how did you create the sub-subdomain exactly?

    Through cPanel.
    Earlier (I had used AO for cdn.domain.com and it worked), but now not. Also, I faintly remember doing something with pointing this cdn.domain.com to the document root, that is public_html, but not sure).

    I just want that the browser should load static thru cdn so that in parallel downloads, the http requests will reduce.

    Anyway, if I am terribly wrong, you can put it here and then delete the thread. May be it will be embarrassing to you.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no problems with the thread or the questions @ghitorni, but the way to create a working alias (which is done on DNS and webserver config) in the cPanel context is not something I’m familiar with, so afraid you will need assistance (e.g. from your hoster) for this. once the http://www.cdn.subdomain.domain.com/wp-content/cache/autoptimize/index.html (or http://www.cdn.subdomain.domain.com/wp-content/cache/index.html or http://www.cdn.subdomain.domain.com/wp-inclused/js/jquery/jquery.js) URL is confirmed working we can discuss how to add it to AO again 🙂

    Just broad thinking

    After AO has generated the optimized JS and CSS, can it be loaded from a sub-domain? In parallel loading, the delay can be minimized.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    yes it can, but AO assumes a working subdomain 🙂

    do take into account that parallel loading over sub-domains is only useful when on HTTP 1.1, when on HTTP/2 parallel loading is better done on one and the same domain.

    I tested my website on keycdn.com and it showed:

    Negative! http://www.yourdomain.com does not support HTTP/2.0.

    I have many subdomains active since around 3 weeks. Can you now suggest something? I will post my findings here and, I believe many will benefit from this experience.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’m not entirely sure what you would want me to suggest here I’m afraid, but here’s an overview of what you could do;

    * create a subdomain (e.g. http://subdomain.host.tld/)
    * make sure that points to the same docroot as your main domain (http://www.host.tld/)
    * test bye trying http://subdomain.host.tld/wp-includes/js/jquery/jquery.js, which should show jquery.js
    * if that works you can set AO’s CDN to http://subdomain.host.tld/ 🙂

    hope this clarifies,
    frank

Viewing 13 replies - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.