read
I’ve been hosting my Jekyll sites on GitHub Pages for years. It’s simple and free. But I recently migrated to Cloudflare Pages, and here’s why.
Why Cloudflare Pages?
The main feature that drives my to cloudflare is that I can deploy different branches. eg. I can have a beta branch serving to a beta subdomain for preview.
Other features:
| Feature | GitHub Pages | Cloudflare Pages |
|---|---|---|
| CDN | Limited | Global (300+ cities) |
| Bandwidth | 100GB/month soft limit | Unlimited |
| Build minutes | 10 min limit per build | 500/month free |
| Preview deployments | Manual setup | Automatic per branch |
| Custom domains | 1 per site | Unlimited |
| Edge functions | None | Workers available |
| Analytics | None | Built-in |
| DDoS protection | Basic | Enterprise-grade |
Migration Steps
- Create account at pages.cloudflare.com
- Workers & Pages → Create → Pages tab → Connect to Git
- Select repo, set branch to
main, build commandbundle exec jekyll build, output_site - Deploy and verify at
your-project.pages.dev - Add custom domain in project settings
- Update DNS to point to your domain eg.
samwize.com(auto if already on Cloudflare) - Disable GitHub Pages in repo settings
Disable GitHub Pages
Once confirmed working:
- Go to your GitHub repo → Settings → Pages
- Set source to None
That’s it. Your site is now on Cloudflare Pages.
If something goes wrong, rolling back is straightforward:
- Re-enable GitHub Pages in repo settings selecting back the branch
- Update DNS to point back to
your-username.github.iowith the github IPs - Remove custom domain from Cloudflare Pages