Cache miss for non-trailing slash URL paths (WordPress)

Facing DDOS. Deploying different strategies to mitigate it.

Just observed that URL that doesn’t contain a trailing slash doing CACHE MISS

ALWAYS CACHE MISS: [https://techpresident.com/live-cricket-streaming-sites]

CACHE HIT WITH TRAILING SLASH: 14 Best Live Cricket Streaming Sites In 2021

Attacker using non-trailing slash URL paths so that the requests hit origin server that ultimately causing MySQL service to stop.

Though I’m using Pro plan and enabled WAF, still most of the DDOS requests hitting the origin server (URL not ending with a trailing slash).

Can anyone help me implement a Page Rule or Worker or Firewall rule that will do the trick? I do not want non-trailing slash ("/") requests to reach the origin server that always returns cache miss.

Please keep in mind I use WordPress, adding a slash to every URL path may result in conflicts. Any solution for this?

Thanks in advance for the favor.

Try adding an Edge Cache TTL to that Cache Everything rule and see if that helps.

Thanks for the input. Added. It didn’t help.

Non trailing slash URL always hitting origin whereas URL with trailing slash doing cache hit.

It’s showing a HIT for me now. Before, it was always showing EXPIRED.

1 Like

Great. But in browsers, it is still showing cache miss. Please check screenshot

It appears you did not clear your browser’s cache.

Here’s how it should look:

3 Likes

It worked. You’re a champion man. I can’t thank you enough for this help.

1 Like

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