My broader digital garden (all kinds of blogs, domains, apps, and ninjas, and lasers), much like my real garden, has been growing weeds for a couple of years. I've been neglecting it for far too long, and it's time to clean it up. I've been thinking about how I can simplify my life and workflow, and reduce costs, and one of the things that came to mind was moving my domains from Namecheap and apps/websites hosting from Netlify.
Why migrate sites and transfer my domains
At Netlify, I've been paying for many, many years for a Pro account, and it's served me well. But I've been thinking about how I can reduce costs.
I've read somewhere that, if not using many serverless functions (and I don't use that many), Cloudflare Pages is a good and economical choice.
On top of that, Cloudflare's broad range of services would allow me not only to consolidate (almost) all websites under one roof, but also to take advantage of their security features, such as DDoS protection and their domain registrar, which appears to be offering slightly better prices than Namecheap. Across all domains, switching to Cloudflare allows me to save nearly 100 USD per year.
Seeing how I picked up ANOTHER expensive hobby (watercolor painting), I need to save money wherever I can.
The migration process was surprisingly easy, but I couldn't migrate everything in one go because I have a many domains. When transferring a domain, it's usually required to renew for an additional year. Therefore, by transferring all of them at once, domain renewals would have burned a 200 USD hole in my pockets, which, after buying art supplies this month, are as sieves.
So I started with my blog, which is the most important one.
Setting up the domain on Cloudflare
The first thing I did was add the domain to Cloudflare (from the account navbar, "Add site"), taking full advantage of their DNS records importing - it made the process fast and painless. But maybe a little too fast 😅
I added the NS records they offered during this process to my domain on Namecheap. This was a mistake, as the NS records propagated very fast and I ended up with the site being down for about 15 minutes. But no matter. I don't think anyone noticed.
For the other websites, I'll be setting up the application in Cloudflare Pages first, then adding the domain to Cloudflare. This way, I can avoid the downtime.
Deploying the site
For this part, I followed the excellent Astro documentation for deploying an Astro site to Cloudflare Pages . But, doh, I was too tired to read the docs and I just scanned them 🫣
This led to another mistake - I forgot adding the Cloudflare adapter to my Astro app, which caused the site to not work properly. Specifically, the RSS feeds were broken, because they use server-side logic, which wasn't available without the adapter. Goes to show that good documentation is only as good as the person reading it 😅
This second error was a bit of a surprize, revealing that weeds are not only on the site and in the garden, but in the brain too sometimes!
Fixing the mistake was easy enough, and the site was up and running in no time. As a sidenote, I am amazed how FAST the build process is on Cloudflare.
Transfering the domain
The last step was to transfer the domain from Namecheap to Cloudflare. I had to unlock the domain on Namecheap, get the authorization code, and then initiate the transfer on Cloudflare.
Thank the gods of the interwebs (and Cloudflare's import of DNS records) that I didn't make a mistake with the DNS records that would have blocked me from accessing my email 😬 That would have been embarrassing.
Conclusion
With two mistakes on the migration, I can say that the process was smooth and painless and that, perhaps, migrations with a headache after a long day of work are not the best of ideas 😅
However, I'm happy with the result, and I'm looking forward to using Cloudflare for other websites too. I'm also looking forward to exploring the other services Cloudflare offers, such as their security features, image optimization, storage and maybe streaming too.
I can't say that I, with my human eyes, can see a difference in speed between Netlify and Cloudflare Pages on the website, but having everything in one place is a big plus for me, especially come bookkeeping time.
Is it all roses and rainbows? No. The Cloudflare dashboard will take some getting used to. And I really, really want support for the .eco
TLD at Cloudflare. It's on their "coming soon" list, so I'm hopeful. And then, I must confess I haven't looked with a magnifying glass over their pricing for everything. I might discover some hidden costs later on, but for now, I'm happy with the move.