CloudFlare is the most popular Content Delivery Network (CDN) used by thousands of bloggers. CloudFlare makes it easy for you to integrate with nearly any CMS especially with WordPress and in most hosting environment resulted from CloudFlare partner's program.
While CloudFlare is easy to setup and could supercharge your site in less than 5 minutes (as advertised), you could produce even faster website load speed by using CloudFlare Page Rules ... which I will explain in a moment time.
BONUS: Best Web Hosting for Small Business
Content Delivery Network is a service which cache most of your static contents and store them on specific servers around the world. For your visitors, they will be noticed a much faster loading speed as these static files will be served to them from the closest location and for webmasters like you, you would be able to reduce your server loads.
The CDN servers are highly optimized to provide only one purpose; which is serving your visitors with statis contents and fast ... regardless which location they are from.
For those who are wondering, static files are images (.jpg, .png, .gif), stylesheets (.css), scripts (.js) and many more.
CloudFlare page rules is for those speed junkies like me who wants to get more out of the free CloudFlare service. Basically, page rules allow you to specify which files you want CloudFlare to cache it on their servers. Of course, the more files they cache, the faster your website speed is and you would be able to save more server bandwidth.
Page Rules is a powerful new set of tools that allows you to control how CloudFlare works on your site on a page-by-page basis. CloudFlare.
CloudFlare page rules is so powerful that it can:
While CloudFlare page rules can be godly, it can easily (literally) destroy your site with tons of 404 errors and slow updates. This wouldn't really happen in this tutorial unless you are really pushing your luck.
Most of us are using CloudFlare free account and you are entitle for 3 page rules plans free of charge. Anything more and you would need to sign up for CloudFlare pro or business plans.
Configuring CloudFlare Page Rules is easy as long as you know which URL pattern to use. This means that very specific page rules settings are applied only to that specific URL's only.
So, what happens if you want to set a custom patterns for several strings of URL without using up all your page rule allotments?
This is where Pattern Matching comes into play. It is a feature that allows you to create powerful dynamic custom patterns that can match a series of URLs instead of just one. The symbol used is the asterisk (*) character.
But does not match:
But does not match:
The first part is adding the relevant URL pattern which you can use from the chart above. Personally, I would advise setting up two specific URL patterns which are:
In the first string of URL, this is where all the extreme caching takes place. The below are the settings for this specific page rule:
Now, for the second string of URL, you would need to make a cache exception for your back-end (wp-admin area). Just follow the settings below:
These are some of the very basic and safe page rule settings that will speed up your blog loading speed and ensuring that you wouldn't face any issue on your admin area. You may change any of these settings to fit your liking or requirements.
Edge cache expire TTL
Sometimes cache headers are set on the server-side or by a CMS solution like WordPress. If you choose to Cache Everything, CloudFlare will respect these headers unless you choose to overwrite them. By overwriting the headers, CloudFlare will cache more content at the CloudFlare edge network, meaning a decrease in load to your server. To overwrite any default headers, choose a time from the drop-down menu. This is the refetch time for when CloudFlare checks the origin server for a new resource. Common situations where you may choose to overwrite any existing headers:
Browser cache expire TTL
This setting is how CloudFlare communicates with the visitor's browser. CloudFlare will respect the headers that you give us from your web server, and then we will communicate with the browser based on the time selected in this drop down menu. For example, your origin server headers may be set to cache for 1 year. You could configure CloudFlare to respect those headers (this is done by default, unless specifically changed), and then choose a different time limit here like 24 hours. What this means is that if you ever had to change the resource over the course of the year, you could know with full confidence that all your visitors would have the new asset within 24 hours, without any additional load to your origin server.
By now, you should have two page rules setup for your blog. The last part would always be clearing your cache on both CloudFlare and on your blog. This is to ensure that the site is running on the latest cache version and updates.
Once this is done, allow CloudFlare and your WordPress blog to build cache over time. If you are using W3 Total Cache, it could takes up to 48 hours while Super Cache could take around 6 hours or less.
Here are two of the most common symptoms that the page rules are not working properly:
Through my experience, the biggest culprit for this could be the Edge cache expire settings. If you have set a very strict and long duration such as 24 hours, this means that CloudFlare will only check for new contents once every 24 hours. CloudFlare recommends a duration of 4 hours as the duration is more than enough for a normal (and average) blog site.
At the same time, it is not recommended to have a shorter duration than what recommended as it could create a lot of resources strain on the hosting servers.
The cheaper and more affordable alternative is using MaxCDN and it only cost you $67.50 per year (with MaxCDN coupon checkout25). For your information, you can integrate MaxCDN with CloudFlare to boost your website speed. MaxCDN is a great tool for bloggers when it comes to serving static contents while CloudFlare ensures that your site is packed with bulletproof security.
If the answer is yes, you certainly got to try the free CDN solution which is CloudFlare. If you are having around 1,000 traffic and below, CloudFlare would be more than sufficient when it comes to make your website blazing fast. With so many hosting companies already partnering up with it, I see absolutely no reasons why you shouldn't!
Tell me what you think using the comment form below and if you like the article, I would appreciate a social share!