• Resolved vallered

    (@vallered)


    Hi,

    upfront I would like to mention that your plugin is great!

    I am on siteground hosting with integrated Clooudflare CDN. As there is no information on which paths on cloudflare my css and js is stored, I just put the CNAME https://www.elementordev.vallered.com.cdn.cloudflare.net, which is linked to my subdomain elementordev.vallered.com, as URLs for CSS and JS into your plugin. But does not seem to work.

    Any expert hints from your side on that?

    The CDN is also active on my root domain https://www.vallered.com

    Best Regards

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @vallered I’m glad you like the plugin and hopefully, you will use it in the long run! Regarding the CNAME, note that it applies to optimized/combined CSS/JS by Asset CleanUp from /wp-content/cache/asset-cleanup/.

    After checking your DEV website that you provided, there doesn’t seem to be any references to /wp-content/cache/asset-cleanup/ – The reason this feature was added was in case a CDN is used (and the path to the caching directory remains the same (without reference to the CDN), hence you need to supply it in “CDN: Rewrite assets URLs”. Also, consider adding it like this: //www.elementordev.vallered.com.cdn.cloudflare.net (without https:) as it’s more likely it will work if there are references to any Asset CleanUp cached file.

    Let me know if this helps and I’ll be happy to further assist you!

    Thread Starter vallered

    (@vallered)

    Many thanks for your response. The plugin was deactivated tmeporaly, but now it is on again. I made the change (without https:), but I get errors like:

    Failed to load resource: net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH

    Plugin Author Gabe Livan

    (@gabelivan)

    @vallered It looks like the path to the files was added correctly (you can view the HTML source code and you will see everything looks good).

    For instance: https://www.elementordev.vallered.com.cdn.cloudflare.net/wp-content/cache/asset-cleanup/js/item/gag-tracker-v1.5.2-3790070e87a069170fe60340c318e80ffb0c10a5.js – the error is related to the fact that the URL you’re trying to access doesn’t support the SSL protocol. You can read more details about the error if you access the URL in the browser (in Chrome, you can click “Details”).

    Are you sure the CNAME is the right one? Note that Asset CleanUp doesn’t do any push of content from the server to the actual CDN (it just replaces the domain name with the one you provided and it’s doing it well). The hosting company / Cloudflare should help you with that.

    Thread Starter vallered

    (@vallered)

    It is nearly impossible to get any direct support from cloudflare (I tried it, they are working with fully automated answers-))

    If I am skipping that, will it have a bigger negative effect on site performance, or is there a way to check if it has any impact in my case at all?

    Plugin Author Gabe Livan

    (@gabelivan)

    @vallered I’m surprised about Cloudflare slowness in response. I’ve contacted them the other day and they got back to me within 24 hours with a reply. Try other means to contact them. I’d be surprised if they can’t help you.

    If by “skipping that” would mean stop using Cloudflare completely, it’s not something I’d recommend unless you have a similar service to replace it. Regarding the CDN, it does have an advantage if your website is accessed globally (not only from the same city/country) as it loads the assets from the closest location where the visitors are located. Moreover, it can reduce bandwidth costs if you have loads of visitors. Here’s a post about CDNs if you want to find out more about it: https://wp-rocket.me/blog/cdn/

    Thread Starter vallered

    (@vallered)

    by skipping that I only meant not to activate the CDN Rewrite URL option in your plugin

    Plugin Author Gabe Livan

    (@gabelivan)

    You don’t have any CDN URLs (all assets are pointing locally) for both your live and staging site. If you skip the CDN rewrite URL option, then it won’t do anything, no replacement of the site URL with the CDN one. Once you get a working CDN and you notice that references to CSS/JS files from /wp-content/cache/asset-cleanup/ are not taken from the CDN, only then you can worry about it (e.g. enable it and make tests).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘CDN Rewrite assets URLs with cloudlfare’ is closed to new replies.