• Resolved Saurabh K

    (@thesaurabhk)


    Hey Salvatore,

    Thank you for the awesome plugin. I am using it on a couple of sites and getting awesome results.

    I recently observed that the caching of subdomain files does not seem to work.

    I have tried defining subdomain via PHP constant you have provided in FAQ as well, but no luck.

    It might be because of the Cloudflare Page Rule created by the plugin is only for the main domain. That is – https://example.com/*

    But to cache the subdomain files on Cloudflare,

    (1) it should be *example.com/* or
    (2) one needs to add a separate Page Rule for the subdomain i.e. subdomain.example.com/*

    I have tried by manually editing the above Page Rules, but it didn’t work.

    Is there any other workaround for the same? Looking forward to hearing from you.

    By the way, the plugin is really awesome. Keep up the great work.

    Cheers!
    Saurabh

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi dear,
    there is the option to fill to make it working on subdomain, please try it and disable/re-enable the page cache. The page rule should change.

    I use it on may subdomains, let me know ??

    Regards!

    Thread Starter Saurabh K

    (@thesaurabhk)

    Hi,
    The page rule did change after disabling and then re-enabling as you said.
    But now, there is a Cache Everything rule for the subdomain only. i.e. cdn.example.com/*
    What about the main domain? What if, I wanted to use Cloudflare cache on the main domain and subdomain both?
    Best’
    Saurabh

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Hi @thesaurabhk ,
    different domain = different site, then new plugin installation and new page rule.

    You can also manually force the use of a single rule on Cloudflare, however if you disable and re-enable the cache, the plugin will create a rule again which you will then have to delete

    Thread Starter Saurabh K

    (@thesaurabhk)

    Hi Salvatore,

    different domain = different site, then new plugin installation and new page rule.

    Well, this is totally understandable.

    Let me clarify my query to you again. My main domain is example.com and I am calling static resources like JS and CSS files via sub-domain which is cdn.example.com.

    Now, I want to use CF cache for all the resources and webpages. Which can only be possible if

    (1) I use two separate page rules https://example.com/* & cdn.example.com/* or
    (2) This Wildcard in Page Rules *example.com/*

    Is it possible to manually edit and use the above Page Rules with the plugin?

    Plugin Contributor Salvatore Fresta

    (@salvatorefresta)

    Yes you can but if you disable and re-enable the page cache from the plugin’s settings page, it will try to re-create the page rule for the configured domain name.

    Keep only this in mind

    Thread Starter Saurabh K

    (@thesaurabhk)

    Thanks for the update. Will get back to you if needed.

    Thread Starter Saurabh K

    (@thesaurabhk)

    Hey Salvatore,

    There is a separate issue that we have discussed earlier in this thread, but it is related to the subdomain.

    I am not able to remove the subdomain from the plugin. Whatever I did, the subdomain field got filled automatically when I set up the plugin.

    I have tried –
    (1) Disable Cache
    (2) Reset Plugin
    (3) Tried to save with blank subdomain field
    (4) Deactivated and Deleted the plugin and again installed it.
    (5) I also can not replace the subdomain with any other.

    Due to this, the plugin always setup the CF page rule with a subdomain only. Which prevents the main domain to be cached.

    Please look into the same.

    • This reply was modified 4 years, 9 months ago by Saurabh K.
    • This reply was modified 4 years, 9 months ago by Saurabh K.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Subdomain Caching Doesn’t Seem to Work’ is closed to new replies.