Comparing Netlify and Cloudflare Pages
For the last three years, I used Netlify to host my website. I was pretty happy with the services this company provides, especially considering that they were free of charge for me. However, recently Cloudflare has also launched its JAMstack platform called Cloudflare Pages, and I decided to try it myself in order to discover its pros and cons. In this article, I compare the services provided by these companies from a blogger perspective, and share my opinion when each of them should be used.
Table of Contents
Someone may ask, if I am happy with the Netlify services why have I decided to choose an another provider? The answer is simple: I really like what Cloudflare does for the Internet and keep an eye on their activity. In particular from my expert point of view, their contribution to the Domain Name System is impressive: they run popular public DNS server 126.96.36.199 with DNS-over-HTTPS (DOH) support support, and have recently open-sourced Oblivious DOH proxy enhancing end users' privacy. I even applied to their research department, but got rejected because there were no available positions.
Second, by default Cloudflare provides a basic server-side analytics. So as this blog targets mostly technical audience who often use privacy-preserving plugins in their web browsers, I know that my Google Analytics does not report correct numbers. Thus, I always want to assess what percent of the audience stays in the shadow without switching to a paid Netlify plan.
Last but not least, I wanted to try this new service and make my own conclusion about it. Shortly, both these services have their pros and cons, there is no clear winner among them. So let me consider them closer.
To my point of view, project instantiation is a little bit easier on Netlify. The main Cloudflare’s business is in providing a proxy platform (CDN + DDoS protection + caching) to websites, therefore user interface is polished for these services. Cloudflare Pages is an extension of company’s services portfolio, and it is not integrated smoothly. In order to run a JAMstack website on Cloudflare, you need to perform several actions:
- Deploy your application on Cloudflare Pages
- Configure a custom domain for your application
- Set up a new site on the Cloudflare platform
If you launch a website on this platform for the first time, you may spend some time grasping how to do this properly. Moreover, if you migrate a website that is hosted already on another platform (as in my case), the situation may be even worse: you may think that your configured Cloudflare site proxies your website from Cloudflare Pages, whilst it proxies the requests to the platform where you have previously hosted your website. This has happened to me, and until I deleted my website on the Netlify platform I thought that I have had configured everything properly.
Bear in mind that the settings (especially related to the DNS subsystem) on these platforms are not applied instantly: it may take some time to propagate them to the Cloudflare or Netlify edge network. So, if you think that you have configured everything properly, but some functionality does not work as expected, just give the platform some time.
Being a more mature JAMstack platform, Netlify provides more options where your website source code can be hosted. Netlify has plugins to enable continuous deployment from GitHub, Gitlab and Bitbucket. Moreover, with a paid subscription you can use self-hosted GitHub or Gitlab deployments as well. So as Cloudflare has just entered this market, you can activate continuos deployment only if you use GitHub to host the code.
I will not describe here all the steps how to set up a project on these platforms because 1) you can find this information in the documentation, and 2) this kind of information may change in the future. However, I should highlight that currently Netlify provides you two ways to configure build settings for your project, namely through the web-based interface and through special
netlify.toml file; while on Cloudflare Pages only basic settings through web-based interface are available.
Both platforms consider as features different things, therefore it is hard to compare them directly. Moreover, some items considered as a feature on one platform are not considered as ones on another. For instance, let’s take “DDoS protection” as an example. On Cloudflare, this item is mentioned among the features of the platform, while Netlify does not list it, while under the hood, Netlify also has a DDoS protection engine. At the same time, I should note that Netlify has a bandwidth limit on a free tier plan of 100 GB/month, while to the best of my knowledge Cloudflare does not bound the bandwidth. Thus, if you exceed this quota on Netlify you will need to pay to remain your website available. Therefore, there is no huge economical incentive for Netlify to improve its DDoS protection engine, while I see that such motivation may exist for Cloudflare.
Additionally, we have to consider Cloudflare and Cloudflare Pages as two separate products. Nothing prevents you from having Cloudflare as a proxy to your website hosted on Netlify. Thus, it is possible to make use of some features provided by Cloudflare even if your website is on Netlify. While the official Netlify’s position is that there is no need in combining them, I see cases when a combination of them may be desired. For instance, you can use such setup to collect basic server-side analytics for free.
In order to discover all critical differences, I recommend you to make use both these platforms for some time. However, some understanding of each platform functionality you can get from Netlify’s and Cloudflare’s pricing plan pages. In short, both these platforms provide a set of features required to host a modern static website:
- Automatic builds
- Branch previews & Rollback to any version
- DNS management
- SSL certificates (and their automatic renewal)
- Redirects & Custom headers
- Additional plugins/apps
- Automatic deployment on the edge network
I should note that to my point of view on Netlify “Redirects & Custom headers” are implemented better: you just describe the rules in the
netlify.toml file, and there are no additional limits. On Cloudflare in order to implement “Redirects & Custom headers” you need either define corresponding “Rules” (max 3 rules on the free plan) or implement specific “Workers” (up to 100K req/day).
On top of these features, Netlify has own unique proposals that I am aware about:
- Build plugins
- Build badge
- Split testing
Free Cloudflare plan also has its exclusive advantages:
- Basic server-side analytics
- DNSSEC support
- HTTP/3 support
- Scrape shield
As I previously mentioned, even if you website is hosted on Netlify you can still make use of these advantages by configuring Cloudflare as a proxy. However, in this case you need to support configurations on both these platforms, that can be time demanding. Additionally, some Netlify features, e.g., “Split testing” may not work properly if you have such setup.
Free Tier Limitations
When you make a decision where to host your personal website, besides the features you also consider the limitations each platform has. In order to make your choice easier, I have compiled the limitations of free tier plans into one table:
|Network Bandwidth||100 GB/month||Unlimited|
|Storage||100 GB||20,000 files
25MB max each file
|Deploys||1 build at a time
300 build minutes/month
|1 build at a time
|Server-less Functions||125k per site /month||100k/day|
|Forms||100 forms submissions/month||Service is not provided|
Now, I will share my personal experience with these platforms. Note that I use Cloudflare services only for one week, while I am a Netlify user for almost three years.
First of all, I want to mention that Netlify’s platform seems to me more polished and intuitive. Cloudflare Pages and Cloudflare Sites are still two different products that are not integrated smoothly yet. Thus, the locations of some settings are not obvious, and you can spend some time to figure out where to find them. However, Cloudflare’s platform is new, and I think UI/UX will be improved with the lapse of time.
Second, to my experience the website on Netlify builds and appears online faster than on Cloudflare. I think that Netlify’s build system is currently optimized better. Still I think that Cloudflare will improve this experience as well.
Cloudflare’s basic server-side analytics may be its killer-feature for free tier websites. Indeed, when you start blogging you want to know if the traffic to your website grows, and what articles are the most interesting to your audience. Client-side solutions may be blocked by different anti-tracker solutions, and thus may provide incorrect data. At the same time, when you run your free blog you do not want to spend additional money subscribing to paid services. However, if you plan to use paid server-side analytics services note that Cloudflare and Netlify have different subscription models for this feature: on Netlify you need to pay 9 US dollars for every website per month (or you can subscribe to Business plan for 99 US dollars per month per member to enable server-side analytics for unlimited number of sites); on Cloudflare you have to subscribe to Pro plan (20 US dollars/month) to get “Privacy-first analytics”. Bear in mind that if you have a free account on Netlify the analytics only for 250,000 pageviews/month is included.
Note that Cloudflare may be not an option if some of your website files are more than 25MB each or total number of files is higher than 20,000. Netlify instead bounds the total storage size (max 100 GB) and the bandwidth per month (100 GB/month). This limitations may be crucial for some users. For instance, if you plan to include video files to your website you may prefer to use Netlify.
For a long time, Netlify was a leader on the JAMstack market, but with the appearance of Cloudflare Pages its domination is not undisputable anymore. In short, if you need simple hosting for your static website or blog, both platforms are good. If you want to enable basic server-side analytics and newest network features like DNSSEC and HTTP/3, and you do not want to care about the bandwidth you should consider Cloudflare. If you want a smooth experience, forms and split testing then you should choose Netlify. You may also consider combining these platforms to get benefits of both, but note that some features may be not available to you in this case.