Url without '/' are not getting cached

Hello everyone, I’m creating a blog on wordpress and trying Cloudflare for the first time. I signed up today with CF. I found that, if I enter my domain name or any page or post url it’s getting cached only if the url has ‘/’ in the end, otherwise I’m getting a miss. What changes I’ve to make to get it right ?

Sharing screenshot for my page rules: Screenshot by Lightshot

I see it is cached.

% curl -I https://vishugulati.com/hello-world/

HTTP/2 200

**date** : Thu, 30 Apr 2020 12:37:23 GMT

**content-type** : text/html; charset=UTF-8

**set-cookie** : __cfduid=deaa165072183a767436f64646bda717d1588250243; expires=Sat, 30-May-20 12:37:23 GMT; path=/; domain=.vishugulati.com; HttpOnly; SameSite=Lax

**vary** : Accept-Encoding

**x-pingback** : https://vishugulati.com/xmlrpc.php

**link** : <https://vishugulati.com/wp-json/>; rel="https://api.w.org/"

**link** : <https://vishugulati.com/?p=1>; rel=shortlink

**x-wp-cf-super-cache** : disabled

**x-frame-options** : SAMEORIGIN

**x-content-type-options** : nosniff

**x-xss-protection** : 1; mode=block

**cache-control** : public, max-age=43200

**referrer-policy** : strict-origin-when-cross-origin

**x-cacheable** : YES

**age** : 11

**x-cache** : HIT

**strict-transport-security** : max-age=15768000

**cf-cache-status** : HIT

**expect-ct** : max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"

**server** : cloudflare

**cf-ray** : 58c150540d90ce3b-LHR

**alt-svc** : h3-27=":443"; ma=86400, h3-25=":443"; ma=86400, h3-24=":443"; ma=86400, h3-23=":443"; ma=86400

**cf-request-id** : 026cb088840000ce3b943ea200000001

Caching just fine

image

Thankyou very much @User3011 and @Sandro for replying. Pardon me as I’m a non tech guy, learned about Cloudflare through google searches for improving pagespeed score.

When I checked in https://cf-cache-status.net/ for:
mysite.com’ → miss
mysite.com/’ → hit/succes
again for ‘mysite.com’ → hit/sucess

same happened for, first time without slash ‘mysite.com/hello-world’ → miss then second time with or without slash hit. All urls had https:// in the start, didn’t took the screenshot, but this is what happened. Got some message like served from originating server.

The first request can very often be a miss, simply because it is not cached at that point.

Please use the search, as the caching topic has been covered quite a few times.

will do that for sure @sandro. Thank You :slight_smile:

Cheers !

This topic was automatically closed after 31 days. New replies are no longer allowed.