Updated September 23, 2026 · 11 min read
Cloudflare Pages vs GitHub Pages, compared on what decides it in 2026: free limits, commercial use, no-Git uploads, domains, and the move to Workers.
Short answer: Cloudflare Pages is the more generous free host: unlimited bandwidth, 500 builds a month, and no commercial-use ban on its product or limits pages. GitHub Pages caps sites at 1 GB and forbids running an online business on it (official docs, checked September 2026). The catch: Cloudflare now recommends Workers for new projects.
In this guide
- Cloudflare Pages vs GitHub Pages at a glance
- Free limits: where Cloudflare Pages wins, and where it doesn’t
- Commercial use and private repos: the rules that decide for you
- Uploading without Git: GitHub Pages vs Cloudflare Pages for non-developers
- Custom domains and HTTPS on each platform
- Cloudflare and GitHub Pages together: three setups people mean
- The future of Cloudflare Pages: what it changes in this choice
- Which should you pick? Cloudflare Pages vs GitHub Pages verdicts
- Where sofast fits
- Frequently asked questions
Most “Cloudflare Pages vs GitHub Pages” threads were written by developers, for developers, and many predate 2025. This comparison is for someone like Julien, a freelance designer with a finished HTML folder from an AI tool and no Git habits. It compares both free hosts on the rules that decide the choice. Every figure comes from official documentation and is dated. For the full background on one side, read our pillar guide what is Cloudflare Pages.
Cloudflare Pages vs GitHub Pages at a glance
Both services host static websites for free and give you HTTPS. A static website is a set of ready-made files, such as HTML, CSS, JavaScript, and images. GitHub Pages is “a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub,” says GitHub’s documentation. Cloudflare Pages is Cloudflare’s hosting service for static sites and front-end apps, served from Cloudflare’s network in 348 cities (cloudflare.com/network, checked September 2026).
In plain terms: A repository (or “repo”) is a project folder stored on GitHub that keeps every version of your files.
The table compares the free tiers. Sources: Cloudflare Pages product page and limits docs (updated September 5, 2026), and GitHub’s Pages limits and “What is GitHub Pages” docs, all checked September 2026.
| Criterion | Cloudflare Pages (Free plan) | GitHub Pages (GitHub Free) |
|---|---|---|
| Price | $0, no credit card required | $0 with a public repository |
| Bandwidth | Unlimited | 100 GB per month (soft limit) |
| Site size | 20,000 files per site | 1 GB per published site |
| Maximum file size | 25 MiB (mebibytes, about 26 MB) | 25 MiB via browser upload |
| Builds | 500 per month, 1 at a time | 10 per hour (soft limit) |
| Build or deploy timeout | 20 minutes | 10 minutes |
| Commercial use | No restriction stated on the product or limits pages | Online businesses, e-commerce and SaaS prohibited |
| Private source repository | Supported via Git integration | Needs a paid GitHub plan |
| Custom domains | 100 per project | One domain in the CNAME file (apex and www can both work) |
| Upload without Git | Dashboard drag-and-drop, up to 1,000 files | Browser upload, up to 100 files at a time |
| Free address | project.pages.dev | username.github.io |
| Server-side code | Pages Functions (billed as Workers requests) | None: static files only |
| Status in 2026 | Supported; Cloudflare recommends Workers for new projects | Current GitHub feature |
Free limits: where Cloudflare Pages wins, and where it doesn’t
On raw free quotas, Cloudflare Pages wins most rows. Its product page says: “All plans come with unlimited sites, seats, requests, and bandwidth.” GitHub Pages sites have “a soft bandwidth limit of 100 GB per month” (GitHub Pages limits, checked September 2026). A soft limit is not an automatic cut-off: GitHub says it may decline to serve your site or contact you.
Builds follow the same pattern. The Cloudflare Pages free plan allows 500 builds per month, one at a time, with a 20-minute timeout. GitHub Pages has “a soft limit of 10 builds per hour,” which “does not apply if you build and publish your site with a custom GitHub Actions workflow.” GitHub deployments time out after 10 minutes. For a plain HTML site, both limits are far away. Imagine a freelancer who updates a portfolio twice a week: that is about 9 builds a month on either service.
In plain terms: A build is the step where a tool turns source code into the final files a browser reads. A plain HTML site from Claude or ChatGPT usually needs no build.
Size is where the comparison gets more nuanced. GitHub Pages measures total size: “Published GitHub Pages sites may be no larger than 1 GB,” and source repositories have “a recommended limit of 1 GB.” Cloudflare Pages measures file count and file size instead: 20,000 files per site and 25 MiB per file on the free plan. A site with many small files fits Cloudflare’s model easily.
In practice, neither size limit worries a typical AI-generated site. A landing page with ten images weighs a few megabytes. The limits matter for heavy photo galleries or video: a file over 25 MiB fails on Cloudflare and in GitHub’s browser upload alike. To compare these quotas with other free hosts, see our ranking of free static website hosting.
Commercial use and private repos: the rules that decide for you
This is the row that many GitHub Pages vs Cloudflare Pages comparisons skip, and it matters most for freelancers. GitHub’s limits page is explicit. GitHub Pages “is not intended for or allowed to be used as a free web-hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)” (checked September 2026).
Read that sentence before you host client work. A shop, a booking site that takes payments, or a paid web app is clearly outside the rules. A portfolio or a personal project is the classic GitHub Pages use case. A small business’s brochure site sits closer to the line, and GitHub’s wording is the reference, not a forum answer.
We checked the Cloudflare Pages product page and the Pages limits page in September 2026. Neither states a commercial-use restriction comparable to GitHub’s. That is not a legal guarantee, since Cloudflare’s general terms still apply to every account. But unlike GitHub, Cloudflare does not frame Pages as a non-commercial service.
Private repositories are the second deciding rule. GitHub Pages is free “in public repositories” with GitHub Free. Private repositories require GitHub Pro, GitHub Team, GitHub Enterprise Cloud, or GitHub Enterprise Server. Even then, the published site is public on the internet; restricting who can view it requires Enterprise Cloud. Cloudflare’s Git integration guide states: “Both private and public repositories are supported” (updated April 21, 2026), with no paid plan mentioned.
In plain terms: A public repository means anyone can browse your site’s source files on GitHub, including drafts and old versions you committed.
For Julien, this is concrete: a client’s unreleased copy in a public repository is visible to anyone who finds it. Our guide on how to host a website on GitHub Pages covers what to keep out of a public repository.
Uploading without Git: GitHub Pages vs Cloudflare Pages for non-developers
Both platforms let you publish without typing a Git command, which is the path most AI-site builders need. The details differ, and Cloudflare has one-way doors you should know before you start.
On GitHub Pages, you create a repository and use Add file > Upload files in the browser. GitHub’s docs say: “You can upload up to 100 files to GitHub at the same time,” and browser uploads are “limited to 25 MiB per file” (checked September 2026). Then you turn on Pages under Settings > Pages, and the site appears at username.github.io. A site with more than 100 files takes several upload rounds.
On Cloudflare Pages, the no-Git path is called Direct Upload. In the dashboard, you go to Workers & Pages, create an application, and drag your folder into the upload area. Dashboard uploads accept up to 1,000 files and 25 MiB per file. The Wrangler command-line tool raises that to 20,000 files (Cloudflare Direct Upload docs, updated April 21, 2026). Select Deploy site, and the site appears at project.pages.dev.
Now the one-way doors. A Cloudflare Pages Direct Upload project “cannot switch to Git integration later.” The reverse is also true: “If you deploy using the Git integration, you cannot switch to Direct Upload later” (Cloudflare Git integration docs, updated April 21, 2026). GitHub Pages has no such lock, because every GitHub Pages site already lives in a Git repository.
In plain terms: Git is a system that records every version of a set of files. GitHub stores Git repositories online and can publish them as websites.
Custom domains and HTTPS on each platform
Both hosts give you free custom domains with automatic HTTPS. The Cloudflare Pages free plan allows 100 custom domains per project (Pages limits, checked September 2026). A root domain such as example.com must be added to Cloudflare as a zone, which means switching your nameservers to Cloudflare. A subdomain such as www.example.com can use a CNAME record at your current DNS provider.
GitHub Pages works with “two types of domains: subdomains and apex domains,” and “you can set up either or both of apex and www subdomain configurations.” GitHub’s troubleshooting docs add: “The CNAME file can contain only one domain. To point multiple domains to your site, you must set up a redirect through your DNS provider.” For the apex, you add four A records pointing to GitHub’s addresses, from 185.199.108.153 to 185.199.111.153.
In plain terms: DNS (Domain Name System) is the internet’s address book. An A record points a name to an IP address; a CNAME record points a name to another name.
GitHub issues certificates through Let’s Encrypt. Its troubleshooting page says: “It can take up to an hour for your site to become available over HTTPS after you configure your custom domain.” GitHub also warns against wildcard DNS records. Our step-by-step guide to a GitHub Pages custom domain walks through every record. On either platform, plan for DNS changes to take up to 24 hours to propagate.
Cloudflare and GitHub Pages together: three setups people mean
Searches for “cloudflare and github pages” or “github pages with cloudflare” usually mean one of three different setups. Forums often mix them up, so here they are separately.
Setup 1: GitHub repository + Cloudflare Pages
This is the most popular combination. Your files stay in a GitHub repository, but Cloudflare Pages builds and hosts the site instead of GitHub Pages. In the Cloudflare dashboard, you go to Workers & Pages, select Create application > Pages > Connect to Git, and pick the repository. For a plain HTML site with no framework, Cloudflare’s guide says to “leave the Build command field blank.”
What you gain: private repositories, unlimited bandwidth, and no commercial-use rule on the Pages pages we checked. Cloudflare also generates “preview URLs for a commit to any branch” (Git integration docs, updated April 21, 2026). Cloudflare recommends limiting its “Cloudflare Workers and Pages” GitHub App to the repositories you deploy.
Setup 2: GitHub Pages behind Cloudflare DNS or proxy
Here GitHub Pages still hosts the site, and Cloudflare manages your domain’s DNS, with two modes per record. With DNS only (gray cloud), Cloudflare answers with “your server’s actual IP address and does not route HTTP/HTTPS traffic through its network.” With Proxied (orange cloud), Cloudflare “sits between your visitors and your server,” returning its own IP addresses (Cloudflare proxy status docs, updated April 21, 2026).
Proxying adds Cloudflare’s caching and DDoS (distributed denial-of-service) protection, but it brings two traps. First, GitHub’s HTTPS setup starts with “an automatic DNS check” to confirm GitHub can obtain a certificate. Our practical advice, not an official procedure: stay on DNS only until GitHub shows HTTPS as active. Second, the SSL mode matters.
In plain terms: A proxy is a middleman server. Your visitors connect to Cloudflare, and Cloudflare fetches the page from GitHub on their behalf.
GitHub’s “Enforce HTTPS” option will “transparently redirect all HTTP requests to HTTPS.” Cloudflare’s Flexible SSL mode, however, “sends unencrypted requests to your origin server over HTTP.” Combined, they create an endless redirect loop, shown as ERR_TOO_MANY_REDIRECTS. Cloudflare’s fix is to set the SSL/TLS encryption mode to “Full or higher” (Cloudflare SSL troubleshooting docs, updated September 1, 2026).
Setup 3: GitHub repository + Cloudflare Workers
This is Cloudflare’s recommended route for new projects in 2026. Workers Builds connects to GitHub and GitLab repositories (Workers Builds docs, updated September 22, 2026). Workers static assets serve files for free: “Requests to static assets are free and unlimited” (Workers pricing docs, updated August 28, 2026). The setup is more technical than Pages. Our comparison of Cloudflare Pages vs Workers explains the trade-off.
The future of Cloudflare Pages: what it changes in this choice
Any Cloudflare Pages vs GitHub Pages decision in 2026 must account for Cloudflare’s own direction. In April 2025, Cloudflare wrote that “Cloudflare Pages will continue to be supported, but, going forward, all of our investment, optimizations, and feature work will be dedicated to improving Workers.” Since August 25, 2026, the Pages docs homepage says: “Start new projects with Workers.”
No official Cloudflare page we checked calls Pages “deprecated” or gives an end date. The accurate summary: still supported, but new features go to Workers. For an existing Cloudflare Pages site, nothing forces a move today. For a new project, you are choosing a product whose owner points elsewhere.
For Julien, this matters less than it sounds. A static portfolio needs files served reliably, not new features. The risk is a future migration, not an outage. To compare more platforms, our Vercel vs Netlify vs Cloudflare Pages comparison adds the two other big names.
Which should you pick? Cloudflare Pages vs GitHub Pages verdicts
The answer depends on three questions: is the site commercial, must the source stay private, and do you want Git at all?
Choose Cloudflare Pages if your site supports a business, your traffic could pass 100 GB a month, or your source must stay private for free. It also takes up to 1,000 files in one dashboard drop. Accept that Cloudflare now recommends Workers for new projects.
Choose GitHub Pages if your site is a personal portfolio, documentation, or an open-source project page. It suits you if you already work in GitHub and accept a public repository.
Choose the combo (GitHub repo + Cloudflare Pages) if you like GitHub for storing files but need Cloudflare’s hosting rules. Remember that a Git-connected Pages project cannot switch to Direct Upload later.
Use this decision tree and stop at the first “yes”:
- Does the site sell products, take payments, or run a paid app? Skip GitHub Pages; its limits page prohibits it.
- Must your source files stay private, and you have no paid GitHub plan? Pick Cloudflare Pages.
- Do you expect more than 100 GB of traffic a month? Pick Cloudflare Pages for its unlimited bandwidth.
- Are you a developer starting a brand-new project on Cloudflare? Follow Cloudflare’s advice and start with Workers.
- Is it a personal or open-source site, and you already use GitHub? GitHub Pages is simple and well documented.
- Do you want neither Git nor a developer dashboard? See the drag-and-drop hosts in our free HTML hosting guide.
Where sofast fits
sofast is not a third branch of this comparison for developers. It answers the last question in the decision tree. sofast hosts static HTML sites by drag-and-drop upload: no Git, no command line, and automatic SSL (Secure Sockets Layer, the certificate behind HTTPS). It is built on Cloudflare’s global network, using a single Cloudflare Worker, R2 storage, Workers KV and Cloudflare for SaaS. It does not run on the Cloudflare Pages product.
The Free plan costs $0 for one site, 50 MB, and a sofast subdomain, with no credit card. Custom domains start on paid plans: Starter at $5 per month, Pro at $10, and Large at $20, billed annually. Monthly billing is $6, $12, and $24. Details are on the sofast pricing page.
Be clear about what you give up. Cloudflare Pages and GitHub Pages are both more generous for free: bigger quotas and free custom domains. sofast has no Git workflow, no server-side functions, and no build step, and it is a new service. Choose Cloudflare Pages or GitHub Pages if you are comfortable with their tools. Choose sofast if you want an AI-generated folder live without learning a developer platform.
Frequently asked questions
For free limits, usually yes. Cloudflare Pages offers unlimited bandwidth, 500 builds per month, 20,000 files per site, private repositories, and no commercial-use restriction on its product or limits pages (checked September 2026). GitHub Pages caps published sites at 1 GB, has a 100 GB monthly soft bandwidth limit, and prohibits online businesses. GitHub Pages remains simpler if you already use GitHub for a personal or open-source site.
No. Cloudflare Pages is still supported, and no official Cloudflare page we checked in September 2026 gives an end date or uses the word “deprecated.” However, Cloudflare announced in April 2025 that all new feature work would go to Workers. Since August 2026, the Pages documentation says: “Start new projects with Workers.” Existing Cloudflare Pages sites keep working.
Yes, in two ways. You can keep GitHub Pages as the host and manage your domain’s DNS at Cloudflare, either in DNS-only mode or proxied through Cloudflare. If you proxy, set Cloudflare’s SSL/TLS mode to Full or higher, because Flexible mode causes redirect loops with GitHub’s “Enforce HTTPS.” Or you can connect your GitHub repository to Cloudflare Pages, which then builds and hosts the site.
Yes, for static sites. The Cloudflare Pages free plan includes unlimited requests and bandwidth, 500 builds per month, 20,000 files per site, 25 MiB per file, and 100 custom domains per project (Cloudflare docs, checked September 2026). No credit card is required. Costs appear only with heavy use of Pages Functions, which are billed as Workers requests; Workers Paid starts at $5 per month.
Only within GitHub’s rules. The GitHub Pages limits page says the service is not allowed “to run your online business, e-commerce site,” or any site “primarily directed at” commercial transactions or commercial SaaS (checked September 2026). A shop or paid app is clearly excluded. For a small business brochure site, read GitHub’s wording yourself, or choose a host without this restriction.
Yes. Cloudflare’s Git integration guide states: “Both private and public repositories are supported” (updated April 21, 2026). You connect the repository from Workers & Pages > Create application > Pages > Connect to Git. GitHub Pages, by contrast, needs a paid GitHub plan to publish from a private repository, and the published site is public either way.
Four points stand out. Cloudflare now recommends Workers for new projects and invests its feature work there. The free plan limits you to 500 builds per month and 25 MiB per file. Dashboard drag-and-drop uploads stop at 1,000 files. And a project cannot switch between Direct Upload and Git integration after creation, in either direction (Cloudflare docs, checked September 2026).
Both require some technical steps. GitHub Pages needs a GitHub account, a public repository, and browser uploads of up to 100 files at a time. Cloudflare Pages accepts up to 1,000 files in one dashboard drop, but root domains require moving your nameservers to Cloudflare. If you want neither Git nor a developer dashboard, a drag-and-drop static host is the simpler route.
Sources
- Cloudflare Pages product page (unlimited sites, seats, requests, bandwidth; no credit card; no commercial-use restriction stated; checked 2026-09-23)
- Cloudflare Pages limits (500 builds, 20,000 files, 25 MiB, 100 custom domains, 100 projects; updated 2026-09-05)
- Cloudflare Pages Direct Upload (1,000 files via dashboard, 20,000 via Wrangler, no functions folder, cannot switch to Git later; updated 2026-04-21)
- Cloudflare Pages Git integration (GitHub and GitLab, preview URLs, cannot switch to Direct Upload later; updated 2026-04-21)
- Cloudflare Pages Git integration guide (“Both private and public repositories are supported”, Connect to Git path, blank build command; updated 2026-04-21)
- Cloudflare Pages GitHub integration (“Cloudflare Workers and Pages” GitHub App, limit to selected repositories; updated 2026-04-21)
- Cloudflare Pages custom domains (apex requires Cloudflare zone, subdomain CNAME)
- Cloudflare Pages docs homepage (“Start new projects with Workers”; updated 2026-08-25)
- Cloudflare blog, Full-stack development on Cloudflare Workers (2025-04-08)
- Cloudflare Pages Functions pricing (Functions billed as Workers requests)
- Cloudflare Workers pricing (static asset requests free and unlimited, Workers Paid from $5/month; updated 2026-08-28)
- Cloudflare Workers Builds Git integration (GitHub, GitLab; updated 2026-09-22)
- Cloudflare DNS proxy status (Proxied vs DNS only; updated 2026-04-21)
- Cloudflare SSL troubleshooting, ERR_TOO_MANY_REDIRECTS (Flexible mode, fix Full or higher; updated 2026-09-01)
- Cloudflare DNS full setup (nameserver update up to 24 hours)
- Cloudflare network (348 cities; checked 2026-09-22)
- GitHub Pages limits (1 GB site, 1 GB repo recommended, 100 GB/month soft bandwidth, 10 builds/hour soft, 10-minute timeout, prohibited uses; checked 2026-09-23)
- What is GitHub Pages (definition, public/private repository plans, github.io addresses; checked 2026-09-23)
- GitHub Docs, Adding a file to a repository (100 files at a time, 25 MiB per file in browser; checked 2026-09-23)
- GitHub Docs, About custom domains and GitHub Pages (subdomains and apex, “either or both”; checked 2026-09-23)
- GitHub Docs, Managing a custom domain (A records, wildcard warning, 24-hour DNS propagation)
- GitHub Docs, Troubleshooting custom domains (CNAME file one domain, HTTPS up to an hour; checked 2026-09-23)
- GitHub Docs, Securing your GitHub Pages site with HTTPS (automatic DNS check, Let’s Encrypt, Enforce HTTPS redirects HTTP to HTTPS; checked 2026-09-23)
Start free — no credit card required → Create your free site