Hi guys! I need some help with Cloudflare and my website.
I’d like to create a rule where all the pages of my domain (included the administration) are cached with Cloudflare.
The website is developed with Wordpress.
Is there a “pattern” that I can use?
Another question: some pages are accessible only after the login; other pages, only if you pay a subscription. How will “scanned” this pages?
You can use *example.com/* to match all paths and hostnames of a domain and set the cache level to Cache Everything.
I would really advise against this, if you login then people not logged in may be able to see the admin pages and they will not work properly. Cache everything is designed to be used on static pages and the WordPress admin panel is anything but static.
You’ll run into the same issue I mentioned above with the admin panel.
It sounds like your site is not static so using a cache everything page rule for the entire site will likely cause a number of unwanted consequences.
Thank you for your reply.
My website is partially static; I’ve some landing pages and other pages with dynamic content.
But, I’ve got Cloudflare free, and based on what I’ve seen… I don’t have many rules to set.
So… what can I do?
The Cache-Control header is set to private, ``Preformatted textno-store, no-cache, or max-age=0.
The Set-Cookie header exists."
So: if I change Cache-Control and Set-Cookie for my website, will I have the problems that you said?(especially for the administration)
Or should I set a Cache-Control/Set-Cookie for each page?
Yes, if you really want to do this manually you can use cache-control headers and set to private or the max age to 0 on your admin and membership pages and that should prevent it being cached with cache everything.