Before implementing static cache content on yours website through cloudflare some informations needs to be understood by readers. They should have a self hosted WordPress website and should have access to hosting account so that you can browse to the website installation file directories. It is necessary for creating a folder which we will talk about it later. First and foremost and obviously you should connect your website with cloudflare. Here we are talking about cloudflare free plan. Generally, with cloudflare paid plans we find entry into static cache content so that same version pf websites can be circulated at the same time all over the world from different parts of the world all over the world of cloudflare servers.
This article is meant the ways to get static cache of yours website from cloudflare completely free. It is in legal way, you can do it and that too completely free. In order to do this, one needs to have serious knowledge about hosting and domain management mechanics. In order to edit hosting side you need to be extra careful and it is indeed you need to back up website before doing serious editing in order to create a static file so that it can work directly with cloudflare.
Here static files means HTML static files. It works from origins server. Here, origin server means the hosting side of website. Static HTML of a website are javascript, CSS and images and when these are cached then website loads faster as these take huge resources for a website to load on a web browser.
First log into yours hosting account and reach to root directory of website. In order to reach there first login to Web hosting. And then in its dashboard from Files segment and then go to File Manager and then it will open another tab inside web browser. From left hand side select public_html , it is generally the root directory of website. If you have wordpress website then in the root directory you will find folder like wp-content, wp-admin, wp-content, wp-includes and so on.
Here, create one folder and rename it as static at the root directory and in this way, creation of a static file of HTML content and now the hosting part of website is completed and now we should return to cloudflare dashboard. As written at the introduction of this website, it is for sure you have connected yours website with cloudflare and now log into cloudflare account. Then from choose website and then from its left hand side choose Rules and then choose Page Rules. We are talking about cloudflare free plan.you have three page rules to do and for static HTML cache we will be using one page rule and for this make sure that there are at least one page rule free to use.
Click one Create Page Rule and then in the URL or description there write down the Page Rule such as example.com/static/ format for example if yours website is mohanmekap.com then the page rule should be mohanmekap.com/static/
This shoud be at the URL segment and the setting from Pick a setting choose CACHE LEVEL and in select cache level choose CACHE EVERYTHING then at the bottom click SAVE.
In this way in the free version of cloudflare you implanted static HTML content through page rules and by creating a static folder inside root directory of yours web host.