Danny Moran

Why I moved my blog to Cloudflare Pages

Published April 01, 2021 by Danny Moran

Introduction

I have used many web hosting providers in both development and production environments throughout my career, as well as for hosting personal projects such as this blog, but as soon as I had access to Cloudflare Pages I was quick to migrate my blog over. I had previously been using Netlify to host my static blog and although I was pleased with the service and performance, there was still a massive urge for me to migrate. I, like many information technology professionals, have been using, and benefiting, from Cloudflare’s enormous edge network.

They state that the Cloudflare network spans over 200 cities in more than 100 countries, meaning that wherever you are in the world you won’t be far from a copy of the cached data.

Cloudflare Network Map

Cloudflare Pages seamlessly integrates into the existing Cloudflare ecosystem and with its simple GitHub integration, I had my blog migrated over in less than 5 minutes. As soon as the deployment was completed, my blog was live and had been deployed to data centers around the world in over 100 countries, and it was given a unique pages.dev URL so I could easily access the site on a provided link. As the site was replicated from my existing GitHub repo and I had specified the same version of Hugo to be used in the environment variables, the process was seamless and everything worked the first time. All that was left for me to do was to change the DNS records for the blog from Netlify to and point to Cloudflare and I was in business. As I was already using Cloudflare for DNS management, this could be easily done through the site settings page. I just had to type in what subdomain I wanted, in my case it was www, and the settings were automatically applied and the record for that specific domain was updated. You can run a naked domain if that’s how you roll, however, I’m firmly on the side of having a subdomain as the primary and the naked domain redirecting.

My current Cloudflare monthly bill is £0! I host my DNS and now my website all using the free tier, and it’s perfect for my use case. The Cloudflare Pages free tier currently offers 500 builds per month, unlimited sites, and unlimited bandwidth. This is more than the Netlify free tier which is 300 build minutes, unlimited sites, and 100GB of bandwidth. The largest downside of not using Netlify is not being able to use the Netlify CMS to manage the blog but I’m fine creating and editing markdown documents myself until I integrate a new CMS.

When hosted through Netlify, I had no analytics on my blog as I am not interested in how many people visit the site as this is more of a personal project where I generally write nonsense, however, this has now changed. Not the nonsense writing, but the analytics. Cloudflare Web Analytics, is Cloudflare’s privacy-first analytics platform that can be seamlessly enabled with the click of a button to any Pages site giving you the ability to easily monitor the traffic to your site. The analytics tool is currently still in beta and needs a bit of work, but overall it seems to work well although I have nothing to compare the data it generates as I have never configured Google Analytics or any of the other analytic trackers on my site.

Website Speed Test via GTmetrix

Using a website speed test site called GTmetrix, I can test to see how optimised the website is and how fast the content loads. The blog passed with grade A and with 100% performace and structure.

Website Speed Test via Google Lighthouse Desktop

I also used Google’s PageSpeed Insights to test the blog and reached the maximum score of 100.

Since the migration to Cloudflare Pages, I have noticed a small improvement in the loading speeds of my site as I am now proxying the site and the DNS queries directly through the Cloudflare network. I haven’t been able to test personally test some of the other features that Cloudflare has to offer such as the DDoS protection of my site as it doesn’t get much traffic but if for some reason it does ramp up, I know the Cloudflare edge network will be able to cope just fine.

Check out a more recent post about how to secure a website for free with Cloudflare Workers