Http getting CF Cache: Dynamic but Https gets HIT

So for one of my sites, when you type in http://domain.com it says CF-Cache: Dynamic

But when you use the https version you get a hit. For this site I have www.domain.com/* = Cache Everything and Browser TTL = Respect Original Browser Setting

Can someone help with fixing this so that but the http and www will be a HIT for CF-Cache

You probably want

*domain.com/*

What’s the domain and post a screenshot of your page rule.

Thank you for replying. The site is https://www.thehowandwhatwebhostingnerd.com I used this site Redirect Checker | Check your Statuscode 301 vs 302 to run both http, www, and https to see the different cf cache responses. Even https without www returns DYNAMIC for CF Cache. The only hit is when it is https://www

For starters, adjust the rule as outlined.

Furthermore, enable “Always use HTTPS”.

Thanks that seems to solve the issue for now.

I don’t think that we need to enable “always use https” because we already have that done through our host.

We did that before and it was causing redirect loops issues so our host advised us to remove that since we already did that on both Lets Encript and on the server level.

As long as you have a proper certificate on your server - as you seem to have - the redirection on Cloudflare should not be an issue.

Nonetheless, glad it works.

I agree that it shouldn’t but you know technology. Sometimes what shouldn’t happen happens.

That’s why testing is very important because often what you enable that works for one website might cause isssues for another.

That would be an error then and should be fixed.

What do you suggest could be causing that?

I dont think it would be an error in the first place. Enable it and we can check.

Another quick question. I notice that you have to refresh browser few times( mostly 3 times) when on http or https to go from expired to Expired to Hit for CF Cache. Is that normal? But when on https://www you get HIT the first time.

Yes, it can take a few requests until it is all cached.

But when on https://www you get HIT the first time. So when you type in http or https:// without www you will have to refresh few times to get HIT.

That means it was already cached.

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