Cloudflare brings back wrong index.php file

What is the name of the domain?

example.com

What is the issue you’re encountering

index.php

What steps have you taken to resolve the issue?

Hello everyone.
I recently edited my website’s index.php file to fix a problem of my website’s home URL.
When doing this, I temporarily disabled Cloudflare on my website.
After fixing the problem, I reverted the index.php file to the original and enabled Cloudflare again.

However, I noticed Google was crawling the edited index.php instead of the right one when Cloudflare was enabled.

I cleared both my website and Cloudflare’s cache several times, but this issue is always back when Cloudflare is enabled.
I see the same issue when I turn on development mode instead of disabling Cloudflare.
Because of this, I can’t enable Cloudflare on my website.

Is there anything else I need to try?

Thank you.

Screenshot of the error

You’ll need to give your real domain name so people can take a look.

This is my website’s URL.

But anyone won’t be able to see the issue right now because Cloudflare isn’t enabled on my website.
My webiste’s rankings dropped a lot because of this issue, and I can’t enable Cloudflare again before fixing this issue.

I just caught the page through Cloudflare…

curl -i https://www.catchopcd.net/
HTTP/2 200
date: Wed, 04 Dec 2024 11:17:59 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-cache-status: STALE
x-powered-by: PleskLin
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=ch7Ydwi98UesEcJoONzFQU8xLmgTToTGy9NXiT92b85innAjazsqdlGTTiPXLorW%2F59Drl6uDViVHFDAYFysOIUQEPB9%2Fv2Nf70bRC1%2Fcprd0sdzJ8ndEacI6yXtoHz9pjm7ixPE%2FWiXdmITnInhKw%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8ecb64a46937652a-LHR
alt-svc: h3=":443"; ma=86400
server-timing: cfL4;desc="?proto=TCP&rtt=0&min_rtt=0&rtt_var=0&sent=0&recv=0&lost=0&retrans=0&sent_bytes=0&recv_bytes=0&delivery_rate=0&cwnd=0&unsent_bytes=0&cid=a8b9749a87a7dcb7&ts=393&x=0"

<h2 style='margin:20%;color:brown'>Store is under maintenance mode .  We will be back soon , Thanks for your cooperation. </h2>

Index pages and .php are not cached by Cloudflare by default, did you create a cache rule to override that? If not, Cloudflare is not caching it.
For that page the cache status is DYNAMIC indicating that Cloudflare is not caching it.

There is an x-cache-status: stale header as well so it seems as if something else is caching, knows the page is expired, but can’t reach the origin. Why that’s happening when requests come from Cloudflare instead of direct I’m not sure.

[add]
Checking directly with Cloudflare, the same is still happening but it’s not being cached by Cloudflare. I suggest you run the below and see what’s happening to the request as it goes through your origin…

curl -svo /dev/null https://www.catchopcd.net --connect-to ::172.67.201.123
< HTTP/2 200
< date: Wed, 04 Dec 2024 11:49:02 GMT
< content-type: text/html; charset=UTF-8
< vary: Accept-Encoding
< x-cache-status: STALE
< x-powered-by: PleskLin
< cf-cache-status: DYNAMIC
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=rdYRnLVrZYfD8K0zBL%2BdZl7vTKtX1X1VyJwOIomDMZ%2BRBfMlwMQ7ekDEcswFxQsdAUy%2Fd%2FfICo0ul7XhFCiLlT8293xyhDEFYhrtIiDe3KNVbCoFcMq%2Fr9r30CkpimWSXI1ahw%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< cf-ray: 8ecb9220bc35652a-LHR
< alt-svc: h3=":443"; ma=86400
< server-timing: cfL4;desc="?proto=TCP&rtt=0&min_rtt=0&rtt_var=0&sent=0&recv=0&lost=0&retrans=0&sent_bytes=0&recv_bytes=0&delivery_rate=0&cwnd=0&unsent_bytes=0&cid=ea4659c7b2af45a7&ts=417&x=0"
<

Thank you for checking.

‘Store is under maintenance mode . We will be back soon , Thanks for your cooperation.’

This is what my developer input when editing index.php.

I haven’t created any cache rule yet, and will forward your answer to my developer.

From what I see you probably have this set already, but just in case, make sure your SSL/TLS mode in Cloudflare is set to “Full (strict)” and not “Flexible”.

Full (Strict) is my current configuration.
I will let my developer to take a look at your answer and will come back if not fixed.
Thank you.

Fixed, it was server side cache, nginx.

1 Like

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