Cloudflare APO + Other CDN

Hey Everyone,

Got an interesting one, right now using a translator service to increase my traffic as my site is popular in alternative countries, however, the service I use has a CDN themselves they serve from and update from the original page every few hours. When APO is off, everything works correctly.

The issue I seem to have is once this is properly cached on the other CDN side, APO serves white blank pages on the subdirectory translated pages using the cache of the other CDN, my normal site is fine like it’s always been with APO.

I’ve lowered TLS settings, checked re-writes, server resources and PHP isn’t an issue and I cannot use a cookie to disable their cache as it disables APO as well (How caching works in GTranslate network? | GTranslate Help Center)

Has anyone had any experience such as this? The service is business edition with subdirectories.


Why two CDN is required, APO does the caching of static as well as dynamic content.

If I could only have APO I’d have one CDN.

There is no option, the service uses its own CDN that cannot be disabled. Hence the question.

From their instructions, how about setting one of their No-Cache headers using a Transform Rule?

I’ve tried a few things

function addNoCacheHeadersForGT() {
header(“Cache-Control: no-store, no-cache, must-revalidate, max-age=0”);
header(“Cache-Control: post-check=0, pre-check=0”, false);
header(“Pragma: no-cache”);

add_action( ‘init’, ‘addNoCacheHeadersForGT’ );


function addNoCacheHeadersForGT() {
if(isset($_SERVER['HTTP_X_GT_LANG'])) {
	header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
	header("Cache-Control: post-check=0, pre-check=0", false);
	header("Pragma: no-cache");

add_action( ‘init’, ‘addNoCacheHeadersForGT’ );

I will keep playing around, was just reaching out to see if anyone may have had experience before. It’s a weird issue, I’ve been asking the translate service for help but seems CF keeps overriding unless I am making a mistake somewhere.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.