I had wanted to migrate my site away from Netlify for some time. It wasn’t a sudden decision; Netlify had been irritating me but not enough to make me move off it1. Then Google, my domain registrar, in possibly some of the worst decision-making by Google since the infamous and much-maligned decision to kill off Google Reader, Google decided to also sell its popular domain registrar service to SquareSpace, of all companies.
After much procrastination and concern, I decided that now was an opportune time to migrate both in one go. Migrating from Google Domains (soon to be SquareSpace) was my number one priority as I wanted to avoid dealing with any potentially complicated process SquareSpace may impose on domain migration.
I’d never moved a domain to another domain registrar before; I’ve never needed to until now. So that was a slightly unsettling prospect. Fortunately, other than an accidental redirect loop and being unable to resolve the site for a few minutes, it was a success.
Riding on this success, I decided I might as well finish the second part: migrating the hosting to Cloudflare Pages.
The number of features and services Cloudflare provides is impressive. I had previously successfully set up a Cloudflare Tunnel that could be reached via a subdomain. It also automatically added the correct
CNAME record for a tunnel!
I was now free to choose how I wanted my site to work. I can now securely expose services and APIs from my infrastructure and homelab with their own subdomains:
example.lloydatkinson.net. This is something I’ve wanted to do for a while.
Although I had already been trying out Cloudflare for some time, as I previously said, I’d never brought a domain over to it. The onboarding for all of this was reasonably smooth. There was a rough edge, though, and I couldn’t find mention of this in the documentation; I needed to set up Cloudflare Pages for both the www and non-www versions. Not doing this caused a Cloudflare error page to be served. Fortunately, Cloudflare staff helped point me in the right direction.
The performance of Cloudflare and Cloudflare Pages compared to Netlify is almost comical. I can tell my site feels snappier as a result of the move. Netlify seemingly prioritises the US segment of the internet, whereas Cloudflare aims to serve anywhere in a performant manner.
|Las Vegas, US
I collected these results just once. I considered creating a benchmark script to automate collecting results from several runs. Repeating the test does improve the Netlify performance somewhat. But, with Cloudflare, the first try was significantly better. This is a valuable test by itself; it shows what the experience for a first-time reader is like.
A surprising difference: refreshing does not cause flickering
Continuing the theme of questionable and essentially blackbox Netlify performance, I noticed a pretty unusual but very welcome change. Refreshing the home page constantly does not flicker when it’s hosted on Cloudflare. If I do this when it’s hosted on Netlify, it does! This one again demonstrates the clear performance benefits of Cloudflare.
This is actually one of the few Netlify features Cloudflare doesn’t have built in. My contact form needs updating once I decide how to build this now missing functionality. On the one hand I could easily write a serverless backend that either writes to a database or emails me. On the other hand, FormSpree has a nice free plan but with the unfortunate downside of only thirty days of archives. Most likely I’ll end up writing something myself, in the form of a Cloudflare Pages function.
I’ll admit I was very apprehensive about migrating my domain. I was worried my site could vanish for days if something went wrong. Fortunately, it was not nearly as scary as I expected. I’m now a happy Cloudflare customer and delighted I have many new possible features at my disposal. The Cloudflare staff were also very helpful in resolving the issue I discussed previously.
Also, I found out just how slow Virgin Media’s DNS cache is. While I could see my DNS changes had propagated around most of the world within an hour, I was still waiting for Virgin Media to catch up over six hours later.