Minimize Redirects - how to enable cache for just one directory?


I’ve noticed in the past year that my site speed while on CloudFlare has depreciated greatly.

I discovered this article about shared hosting and cloudflare minimize redirects issue. It is solved by pausing cloudflare or going into Development mode.

Apparently Cloudflare are working on it but the consensus is not to hold one’s breath.

So I’d like to know if the following is possible and will it work to prevent the minimize redirects?

Can I only enable cloudflare caching on one directory? I have .html and wordpress pages and would like caching only available on the wordpress directory and not the html directories (they load fast and are dramatically slowed by cloudflare on this issue)

I use Cloudflare SSL

My directory structure is like this: (this is a directory I don’t want to cache) (this is a directory I don’t want to cache) (this is the directory I want to cache)

Using pagerules I “think” I need the following* - cache everything* - bypass cache

Or do I make the following page rule
[adding static=true query parameter]

(this bypasses all html files)

And then select Cache everything which will cache all wordpress php files?

Would I be correct in one of the above or will this not help with the minimise redirects as described in the linked post at the top? They said “pause cloudflare” and the issue will stop — I’ve confirmed this and am presuming the issue is caching? Maybe I’m wrong and there’s another way to stop this?




It’s not clear that you are having redirect issues and what is possibly causing t. The article you linked to does not seem to demonstrate that the problem is caused by Cloudflare itself. It could be the result of that site having misconfigured Apps, for example. In case you are having redirect issues, please provide a screenshot of you issue so that members of this community can help you will it.

As for the page rules:

Using pagerules I “think” I need the following* - cache everything* - bypass cache

The firs one should do the job of caching the HTML generated by WordPress under /blog/. You don’t need to specify the protocol https://.* << cache everything.

The second one is actually not necessary, as the first one shouldn’t ever be triggered for pages outside of the /blog/ in your domain.




Thanks for your reply.

I’m attaching a screen shot with the redirects.

I noticed the redirects using as they were slowing the site down.
The urls do not come from my site at all. The pages in question are plain html
I did some online searching and came across which had exactly same issue.

He says that cloudflare are gathering resources from shared hosts and the those same resources are now appearing on other sites on the shared server using cloudflare.

When he pauses cloudflare these redirects vanish. Same here. Attached is an example of these redirects - very similar to the above links issue. Again, none of these come from my pages but are being served when cloudflare is activated.

He also states he’s contacted cloudflare about it

There’s about 20 of these. Some are adsense others are for scripts I do not have like Addthis. There are even some large images being redirected.

By pausing cloudflare these all vanish.

I’m not sure if bypassing cloudflare cache will also solve this hence I’m here!



People can say anything they want, that doesn’t make it remotely close to accurate. Do you have a specific URL that was used in this test?

1 Like


Yes, you are quite correct.

I spent the night trying to figure out where these redirects are coming from - and I found the answer. Adsense-matched content!

When clearing the Cloudflare Cache or pausing it. Adsense Balance came into effect and either less ads were shown or no ads on the next cache and so it looked like when disabling cloudflare the problem goes away. However, it doesn’t as the problem is coming from Adsense and not Cloudflare.

Thank you for helping me try to narrow down where the problem was coming from.

_If anyone else comes across this page and wants to confirm this. Then simply remove all adsense code from your page, clear cache on Cloudflare and you’ll see the problem does not return. Add in Adsense matched content or feeds and the problem comes back.

To reduce your page load from these redirects remove Adsense in page feeds/matched content and the slew of new ad spaces they have been releasing over the year.



Thanks for the update. I spent a bit looking at your site, but without knowing more about the underlying code I couldn’t quite track down where the content was coming from, but suspected either ads or some smart malware which knew enough to hide from gtmrix IPs.

Glad you figured out the source. :slight_smile:

1 Like

closed #8

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