• Our website is multi-lingual (based on WPML), using a separate domain for every language.
    Is it possible to use this plugin with such setting?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi @siteimpulse,

    Thanks for choosing WP Cloudflare Super Page Cache!

    It is possible to use the plugin on multiple sites, but it has to be installed for each one of them.

    Have a nice day!

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @luciamarinescu ,

    I’m not talking about multiple sites, but about a single WordPress website.
    I have WPML language plugin installed and configured with 3 languages (English, Spanish and German). Every language uses its own domain (.com, .es and .de).

    It’s a single WordPress instance, so there is no way to install WP Cloudflare Super Page Cache separately for every domain.

    Is there any way I could use this great plugin?

    Mat

    (@mateithemeisle)

    Hello @siteimpulse,

    Thank you for your message and apologies for the delayed reply!

    In your case, I’m afraid that that is not possible as Cloudflare interprets each domain separately, thus you would need to insert them separately in Cloudflare.

    However, you could adjust your URLs as stated in this thread and make sure that you get all of your languages cached.

    Thank you and have an amazing day!

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @mateithemeisle.

    No problem with configuring all the domains in CloudFlare. In fact, they are already there.
    But your great plugin seems to be able to work only with a single domain per website.

    I just had an idea.
    I will try to use WPML String Translation to translate the value of the domain field for the alternative languages.
    I will let you know if it worked.

    Have a nice day too!

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @mateithemeisle.

    Unfortunately, it didn’t work.
    WPML found 540 strings to translate, but they are all texts from the code – the field contents were not included.
    Also when switching language versions in the CMS, WP Cloudflate Super Page Cache configuration displayed doesn’t change. I guess the plugin needs to be integrated with WPML in some way.
    Perhaps some day you could find some time to look at it: https://wpml.org/documentation/support/achieving-wpml-compatibility-for-your-themes-and-plugins/

    Best Regards.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @siteimpulse,
    Sorry for the delayed response in your case as I was available for few weeks. Anyways, coming to your issue, it is not the plugin issue but rather how WMPL and other translation plugin works. You see in your case you have multiple transition versions of your site on different domains.

    Now when you setup this plugin it only sees your main domain and create the page rule or worker according to what it sees. Tehn when you change the language these system uses JS to hot reloading to the new domain without even passing to actual request.

    A lot of times these are set up on subdomains or /en/ /fr/ and so on. But the servers never actually received these requests. So, Cloudflare is unable to properly distinguish these pages and differentiate them to generate proper cache keys.

    You have not shared your site URL so I couldn’t take a deeper look.

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @isaumya .

    I don’t think JS is responsible for switching languages. And even if it was, it wouln’t matter.
    Our users don’t switch languages. They come from Google to their language version direclty. 2 of 3 language versions are served through CloudFlare already.

    Here are the URLs:
    https://www.supermonitoring.com/blog/
    https://www.supermonitoring.es/blog/
    https://www.supermonitoring.de/blog/

    Cheers,

    Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    from what I see on your site the cache-control has been set to max-age=0 which is literally saying never to cache the page ever. Also there are tons of custom cookies are being set on the page, when Cloudflare will see these custom cookies it will not cache the page anyways thinking these cookies might be used inside the page content using some server level language.
    Screenshot:

    View post on imgur.com

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @isaumya .

    supermonitoring.com/blog/ doesn’t go through CloudFlare (yet), but supermonitoring.es/blog/ and supermonitoring.de/blog/ do. But I guess it’s the same there.

    Thank you so much for brining this to my attention.

    But what about the main topic of this thread? Any chance to make the plugin work with WPML and multiple domains?

    Plugin Contributor iSaumya

    (@isaumya)

    supermonitoring.com/blog/ doesn’t go through CloudFlare (yet), but supermonitoring.es/blog/ and supermonitoring.de/blog/ do. But I guess it’s the same there.

    – I checked all the sites you have given and the cookie thing is the same. So, as long as those cache-control and custom cookies are present Cloudflare will never cache the pages. WMPL comes later first the site’s pages needs to be catchable.

    View post on imgur.com

    Currently if you hypothetically removed WMPL and then use the cloudflare cache it will still not work due to the things mentioned above.

    Thread Starter siteimpulse

    (@siteimpulse)

    Hi @isaumya

    Apart from the cache-control issue, please take a look at the following thread – it might include the solution for multi-domain environments:
    https://wordpress.org/support/topic/problem-with-wpml-with-multiple-domains/

    Plugin Contributor iSaumya

    (@isaumya)

    This plugin can only make API request for the domain where it has been installed and not for the other domains in your CF account. I will definaly look into it but so far it seems very insecure and not sure if can be implemented. So, for the time being if the official CF plugin is working for you, feel free to use that with that above gist.

    Please note the way the official CF plugin handle things and the way this plugin does is totally different.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Can it work with multiple domains?’ is closed to new replies.