Help with Cloudflare Caching Issues on Translated Pages

What is the name of the domain?

What is the error message?

A blank page

What is the issue you’re encountering

Hi there, I’m having a bit of trouble with my website. I use GTranslate to turn the site into different languages, and Cloudflare to save these translated pages. Sometimes, Cloudflare saves a blank page, and the only way to fix it is by clearing the Cloudflare cache. I found a similar issue here: “How to detect blank page and always revalidate it on request?”. Do you know if there’s a way to set up Cloudflare’s page rules or settings to avoid caching pages translated by GTranslate? Thanks a lot!

If you can find some sort if identifier in the request that triggers the translated page, you can add it to a Page Rule to Bypass cache. It’s usually a cookie.

When I visit the site, it’s in French, and I see no way to change the language.

At this time, it looks like you are using APO, and you are currently bypassing cache for your pages.

1 Like

Hello again, and thanks for you reply !

Regarding changing the language on the site, you can find the language selection options at the bottom of each page.

I’ve also taken steps to address the caching issue. I’ve set up a rule in Cloudflare with Cache Level: Bypass for URLs that are specific to translated pages, like “funinformatique.com/es/*” for Spanish. I applied similar rules for five other languages.

However, I’m not entirely sure if this is the optimal solution. Could you confirm if these settings sound correct ? Any advice would be greatly appreciated!

SCR-20240630-mwmd
Thank you for your help!

Thanks for the pointer to the language selector.

It looks like each language comes under its own subdirectory, so all English pages start with /en, Italian is /it , etc.

If you want to bypass cache for language pages, your approach is correct.

2 Likes

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