Why and How to Migrate from Netlify to CloudFlare
Netlify Might Charge You $100K, Even on Their Free Plan
Recently, I came across a Reddit post titled ‘Netlify just sent me a $104K bill for a simple static site’. This caught my attention and caused me some concern, as I’ve been using Netlify’s free tier for hosting this blog for over a year.
To sum up the story: the Reddit user faced an unexpectedly massive bill from Netlify due to excessive bandwidth usage triggered by a DDoS attack on their static site. This site had consistently remained within the free tier’s bandwidth limits prior to the attack. Upon reaching out to Netlify’s billing support, the company recognized the issue and reduced the bill to 5% of the original amount, which was $5,000 (still quite a bit for a free plan user, though). Following a widespread discussion on HackerNews that attracted more than 1700 upvotes and 800 comments, Netlify decided to waive the fee entirely. This incident highlighted the lack of DDoS protection on Netlify and the risk of incurring charges on a supposedly free plan.
An Alternative
Many Reddit comments compared Netlify vs CloudFlare Pages, pointing out that the latter offers superior DDoS protection (well that’s expected haha) and that charges are unlikely even under attack on their free plan.
Curious, I conducted my own research to verify these claims but couldn’t find a clear-cut answer. I’ve reached out to CloudFlare sales for clarification and plan to update this post with their response.
Migrating to CloudFlare Pages with Ease
The incident described above pushed me to consider leaving Netlify. Although I was familiar with CloudFlare Pages, I had never actually used the service. The transition turned out to be surprisingly straightforward.
CloudFlare Pages facilitates the connection of a git repository to your static website, automating builds and deployments with each git push
. The setup process was swift and hassle-free. Their deployment pipeline supports a vast array of frameworks including React, Vue, Angular, Next.js, Gatsby, Svelte, Nuxt, Hugo, among others. Additionally, it accommodates the deployment of any static website.
By linking my GitHub repository to CloudFlare Pages, my site was built and deployed on their *.pages.dev
domain within seconds. I then updated the DNS record for opsdocks.com
to redirect from Netlify to my new CloudFlare Pages domain.
And just like that, I am now looking forward to a worry-free experience as a happy CloudFlare user 😀
September 2024 update: I’m still on CloudFlare. I’m loving it, I’ve had no issues whatsoever, and I’m planning on staying!