I am using Cloudflare for my website. On the site, I have a handler set up as index.php
, which is responsible also for geotargeting. When the site is accessed directly, everything works as expected; Cloudflare triggers the index.php
handler, and the geolocation (country) of the user is correctly identified and handled.
However, I am facing a problem when users find my site through a Google search. When they click on the link from the search results, it seems that Cloudflare serves a cached version of the page. In this scenario, the index.php
handler does not get triggered at all, which means that the geotargeting feature fails to work.
Does anyone have an idea of what could be causing this issue and how to resolve it? I need Cloudflare to always trigger the index.php
to ensure geotargeting works consistently, regardless of how users arrive at the site. Thank you!