404 Errors

Hi, We are currently encountering a significant issue on our WordPress site, where numerous URLs are consistently returning 404 errors.

Upon researching this matter in the forum, I came across a potential explanation suggesting that these errors might be occurring due to delayed responses from our origin server, leading Cloudflare to automatically generate a 404 response. I would greatly appreciate it if you could confirm the accuracy of this information.

As a temporary fix, we have tried resaving the permalinks, which appears to resolve the issue temporarily. However, the 404 errors recur after a few days. This ongoing problem is severely impacting our SEO efforts and overall site performance.

Response with 404 Error:

Response With Cache:

After resaving the permalink which flushes the cache even the cache is miss, response will be served:

How can I resolve this issue? How not to give 404 status even origin is taking long time to give response?

Kindly help.

Where did you read this? It is definitely wrong, Cloudflare does not generate 404 errors. When your server does not respond within 100 seconds, Cloudflare will show a Timeout-page instead.

The 404 page you see is definitely coming from your origin server.

3 Likes

I am assuming in our case as well, if origin is taking long time to respond, cloudflare is responding with the 404 cached version.

Your screenshot clearly shows that Cloudflare does not cache that page (CF-Cache-Status: Dynamic)

You are however using a local cache that is caching the 404 error (X-Cache: Hit)

1 Like

Thank you for this

Following your recommendations, I have successfully enabled the WordPress APO plugin, which has effectively improved the caching for guest users on our site.

However, I am encountering a challenge with our membership website. While logged-in users are currently able to view the same content as guest users, they are unable to access the protected content intended for them. This issue seems to be related to the cache configuration for logged-in users.

Please suggest how to properly configure the cache settings for logged-in users. Would like to ensure that these users do not experience slow loading times, particularly when accessing content exclusive to them.

Not sure I was recommending anything, just stating what happened :wink:

Cloudflare doesn’t know if the user of an incoming request is logged-in or not. Are you trying to cache a page that shows different content for logged-in and logged-out users?