You can exclude certain urls from Cloudflare's caching by using a feature called Page Rules. You can get to Page Rules by going to: settings->Page Rules.
The first step to using Page Rules is to define a pattern that defines when the rule is triggered. These patterns can be simple, such as a single URL, or complicated including multiple wildcards. Imagine you have a content management system with a single administrative URL:
If you want Cloudflare's performance and caching options off for this URL, then you would turn off the options using the drop down menus or toggles for the various Cloudflare features.
Wildcard and Advanced Pattern Matching
The pattern above will only match the following URL:
It will not match any of the following URLs:
http://www.example.com/admin.php [http ≠ https]
https://example.com/admin.php [missing www subdomain]
https://www.example.com/admin [admin ≠ admin.php]
You can make rules more flexible by including wildcards with the * character. For example, if you wanted the pattern to match all four of the above URLs, you could use a pattern like:
A wildcard can represent zero or more characters and can be used anywhere in the pattern. So, for example, the following pattern:
But would not match:
https://www.example.com/blog [missing the trailing slash]
https://www.example.com/sam/index.php [sam doesn't contain a "b"]
Please note: Page Rules are applied in the order that they are listed. If you want to change the position of a Page Rule, you can drag it up or down using the icon on the left hand side.
For a full Page Rule tutorial, visit this article.