GitHub Pages + Cloudflare

Is there a correct way to connect GitHub Pages to a custom domain with Cloudflare?

but it doesn’t work and outdated.

As you noted, that post is very outdated - I haven’t seen that Cloudflare UI in some time, good memories! While that blog post all still seems accurate and should still work fine (the specific UI pieces and toggles may have moved around a little), there’s a much nicer way to do this.

Nowadays, the recommended way to do this would be to use Cloudflare Pages directly:

It works basically exactly as you’re used to with GitHub Pages, but directly hosted on the Cloudflare network, across all of their colos, and with direct integration with GitHub for automatic publishing, preview builds, etc.


I believe there’s a limit of 150 CF Pages, if you do it this way.

There’s a limit to the number of projects that you can create (100), but the upper limit of how many files a project can have is something like 20,000. And the maximum file size for an asset is 25MiB.

GitHub Pages has a total maximum size of 1GB per project in comparison, and bandwidth limits too. Bandwidth on Pages is entirely free!

1 Like

I stand corrected (thanks!) I remember hitting that limit a while back and having to modify my workflow a bit.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.