Does GitHub Pages work in China?

For a public, mainland-China audience the honest answer is "not on its own" — and the reason is licensing and reachability, not tuning. You keep building on GitHub; what a public China site adds on top is an ICP-filed, in-country presence that GitHub Pages' offshore hosting was never designed to provide.

In GitHub's own words, "GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub," and "You can host your site on GitHub's github.io domain or your own custom domain." Both run on GitHub's own infrastructure, which sits offshore from mainland China — there is no mainland-China region and nothing in-country for an ICP filing to attach to. Two consequences follow for a public China site, and the table below sets them against GitHub's own wording: the github.io and GitHub asset hosts are frequently blocked or throttled inside the mainland, so the site can simply fail to load; and a public mainland site needs an ICP filing tied to a licensed in-country host, which GitHub Pages cannot be.

This is a risk picture to take to counsel, not a verdict — what applies turns on whether you serve the public in China, your entity, and the data your site handles. Our China team can map the GitHub + 21YunBox path with you →

What actually decides whether a GitHub Pages site can serve mainland China

FactPrimary source
In GitHub's own words, GitHub Pages is a static host that publishes from GitHub's own infrastructure — which sits offshore from mainland China. "GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub," and "You can host your site on GitHub's github.io domain or your own custom domain." Both the github.io domain and GitHub's custom-domain hosting run on GitHub's own infrastructure; GitHub publishes no mainland-China region or in-country hosting option for Pages. (GitHub documents no China-specific location, so this reads the offshore reality from what GitHub does state — its github.io and custom-domain hosting — rather than from a China statement GitHub does not publish.) GitHub Docs — About GitHub Pages, retrieved 2026-10-07
A github.io site may not even load inside mainland China. Because a Pages site is served on the github.io domain (or a custom domain fronted by GitHub's offshore hosts), access from inside the mainland is subject to the country's network controls, under which the github.io domain and GitHub's asset hosts are frequently blocked or throttled — so a site that works everywhere else can be slow or unreachable for a visitor in Shanghai or Shenzhen. We publish no first-party load measurement for github.io on this page, so this states the reachability reality qualitatively, not as a number. The sourced fact here is GitHub's own: Pages sites live on github.io or a custom domain on GitHub's offshore infrastructure. GitHub Docs — About GitHub Pages (github.io / custom-domain hosting), retrieved 2026-10-07; reachability stated qualitatively, no first-party measurement
A public mainland-China site needs an ICP filing, and there is nothing on GitHub Pages for it to attach to. Under State Council Order No. 292 (Article 4) and MIIT Order No. 33, an ICP filing (备案) attaches to a hosting resource physically inside mainland China and to a mainland legal entity. GitHub Pages publishes from GitHub's offshore infrastructure on a github.io or custom domain, with no in-country host and no mainland entity to file against — so the ICP door simply isn't on GitHub Pages. That is a licensing-and-location boundary, not a defect in GitHub. State Council Order No. 292 (Measures for the Administration of Internet Information Services), Article 4; MIIT Order No. 33 (ICP filing measures)
A mainland visitor's real IP address is personal information, so how it crosses the border is a PIPL question. Serving the mainland from offshore and carrying visitors' real IPs and request logs out of the country is a cross-border transfer under PIPL (Chapter III, Articles 38–43: notice, separate consent, and one permitted transfer mechanism; Article 40, with Cybersecurity Law Article 39 (formerly Article 37), adds in-country storage for a CIIO or large-volume handler). A purely static site is lighter here than a data-heavy app, but the compliant design still answers it the same way: keep an in-country, ICP-filed entry and send a fixed in-country IP to your origin, rather than forwarding each visitor's real IP across the border. PIPL Chapter III, Articles 38–43 and Article 40; Cybersecurity Law Article 39 (formerly Article 37)

Sources verified by the 21YunBox compliance team on 2026-10-07.

GitHub is one of the best places in the world to build and ship a static site, and nothing here asks you to leave it. Your repository, your Actions build and your Git workflow stay exactly where they are. This article is about the one thing a public, mainland-China audience adds on top of that: a presence that is both licensed to operate inside China and actually reachable from inside it. That is a compliance-and-delivery question, and it is the half of “does GitHub Pages work in China” that no amount of build tuning answers — because it was never GitHub Pages’ job to answer it.

The short version is a partnership, not a replacement. GitHub remains your source of truth and build pipeline; 21YunBox sits in front of the site GitHub builds as an ICP-filed, in-country entry for mainland visitors. Below is what GitHub itself documents about where a Pages site lives, the ICP door an offshore static host structurally cannot hold, the reachability gap that makes a github.io site unreliable in the mainland, and the lawful way visitor data is handled at the border — in GitHub’s own words and China’s own law, so you can take it to counsel.

GitHub Docs 'About GitHub Pages' page stating GitHub Pages is a static site hosting service that publishes from a repository to a github.io or custom domain, on GitHub's own offshore infrastructure with no mainland-China region
GitHub's own “About GitHub Pages” documentation: “GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub,” and “You can host your site on GitHub's github.io domain or your own custom domain.” Both run on GitHub's own infrastructure, offshore from mainland China — with no mainland-China region and no in-country path for an ICP filing. Source: docs.github.com/en/pages

GitHub Pages in China at a glance

What decides it In GitHub's own words — and China's own law
What GitHub Pages is In GitHub's words, “GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub.” It publishes to a github.io or custom domain — an excellent way to build and ship a static site.
A mainland-China presence? No. GitHub Pages serves from GitHub's own infrastructure, offshore from the mainland; GitHub publishes no mainland-China region and no in-country hosting option for Pages.
Will it load inside China? Not reliably. The github.io domain and GitHub's asset hosts are frequently blocked or throttled inside mainland China, so a Pages site can be slow or fail to load for mainland visitors. (Stated qualitatively — we publish no first-party github.io load measurement here.)
Serving the public in China A public mainland site needs an ICP filing tied to a licensed in-country host and a mainland legal entity (State Council Order 292, Article 4; MIIT Order 33). GitHub Pages has no in-country host to attach one to.
Visitor data at the border A mainland visitor's real IP is personal information; serving from offshore and carrying it out of the mainland is a cross-border transfer PIPL governs. The lawful design keeps an in-country entry and sends a fixed in-country IP to your origin.
The working design Keep building on GitHub; add an ICP-filed, in-country delivery layer in front of your GitHub-built site. An overlay, not a migration — no rebuild, no second codebase.

What GitHub gives you — and where the mainland boundary is

GitHub’s description of its own service is worth reading before anything else. In its words, “GitHub Pages is a static site hosting service that takes HTML, CSS, and JavaScript files straight from a repository on GitHub,” and “You can host your site on GitHub’s github.io domain or your own custom domain.” For shipping a static site to a global audience this is close to ideal, and it is exactly why your code belongs on GitHub.

What that same description makes plain is where the site actually lives. A github.io address — or a custom domain pointed at GitHub Pages — is served from GitHub’s own infrastructure, which sits offshore from mainland China. GitHub publishes no mainland-China region and no in-country hosting option for Pages, not as an oversight but because Pages is a global static host, built to serve the open internet from the outside in. Two separate things follow once the audience is the Chinese public, one about delivery and one about law, and they are the subject of the next two sections.

Will the site even load? The reachability half

The first problem is delivery, and it is the one most teams hit before they ever think about licensing. GitHub Pages hands visitors a github.io address, or a custom domain fronted by GitHub’s offshore hosts, and access to foreign-hosted domains from inside mainland China is governed by the country’s network controls. In practice the github.io domain and GitHub’s asset hosts are frequently blocked or throttled inside the mainland, so a site that loads perfectly everywhere else can arrive slowly — or not at all — for a visitor in Shanghai or Shenzhen.

We do not publish a first-party load measurement for github.io on this page, so we state this as the reachability reality rather than as a number. But it is the reason a GitHub Pages site can be effectively unreachable in China even though nothing is wrong with your code. This is a delivery gap, and it sits on top of a second, legal one.

The ICP door GitHub Pages can’t hold

Showing a public website to people in mainland China turns on a permission that has nothing to do with performance: an ICP filing (备案). Under State Council Order No. 292 (Article 4) and MIIT Order No. 33, that filing attaches to a hosting resource physically inside the mainland and to a mainland legal entity — a site with neither cannot file. A github.io site has neither: it runs on GitHub’s offshore infrastructure, and there is nothing in-country for the filing to sit on.

This is an ownership-and-location fact, not a knock on GitHub. The filing needs a licensed host inside the mainland to attach to, and a global static host — by design — keeps everything outside it. GitHub Pages is doing exactly what it is built to do; it is simply not, and was never meant to be, an in-country China presence.

Serving mainland visitors, and their data, lawfully

There is one more thing to be deliberate about: visitor data. A mainland visitor’s real IP address is itself personal information under China’s Personal Information Protection Law. Serving a mainland audience from offshore and carrying each visitor’s real IP and request logs out of the country is a cross-border transfer of personal information that PIPL governs (Chapter III, Articles 38–43: notice, separate consent, and one permitted transfer mechanism — a CAC security assessment, the CAC standard contract, or certification; Article 40, with Cybersecurity Law Article 39 (formerly Article 37), adds an in-country storage duty for a critical information infrastructure operator or a large-volume handler).

A purely static site is lighter here than a data-heavy application, but the moment it serves the mainland public from offshore the question is live. The lawful design answers it by terminating mainland visitors at an in-country, ICP-filed entry and sending a single, fixed in-country IP to your origin, rather than forwarding each visitor’s real IP across the border. Your origin seeing one in-country address instead of every visitor’s own is the design working as intended, not a defect to engineer around. Whether a particular site must also store personal data inside the mainland depends on your role and data volumes, which is a question for counsel rather than a default.

Where 21YunBox fits — a compliant overlay, not a migration

You keep building and shipping on GitHub exactly as you do today — the same repository, the same Actions build, the same Git workflow. 21YunBox adds the two pieces a global static host structurally cannot: ICP-filed delivery from inside mainland China, and reliable in-country reachability, placed in front of the static site GitHub builds from your repo — no rebuild, no second codebase, and no leaving GitHub. Our China team maps which obligations apply to your entity and your data, handles the ICP filing, and stands up the in-country entry that serves your mainland audience while GitHub stays your source of truth.

Get a compliance assessment →


Related reading:

Frequently Asked Questions

Do we have to stop using GitHub or rebuild our site to serve mainland China?
No. The compliant pattern is an overlay, not a migration: GitHub stays your repository, your Actions build and your source of truth, and an ICP-filed, in-country delivery layer — built from the same GitHub repo — is placed in front of it for mainland visitors. There is no rebuild, no second codebase, and no change to how you ship to GitHub.
Why can't GitHub Pages itself hold our ICP filing?
Because an ICP filing attaches to a licensed host physically inside mainland China and to a mainland legal entity, and GitHub Pages publishes from GitHub's offshore infrastructure on a github.io or custom domain. There is simply no in-country host and no mainland entity on GitHub Pages for the filing to sit on. That is a licensing-and-location boundary, not a flaw in GitHub; 21YunBox supplies the ICP-filed, in-country delivery in front of your GitHub-built site.
Can 21YunBox help make our GitHub Pages site work in mainland China?
Yes. Our China team can assess the ICP, reachability and cross-border-data exposure for your entity and your data, handle the ICP filing, and stand up compliant, ICP-filed in-country delivery in front of the static site GitHub builds from your repo — so GitHub stays your source of truth. Get in touch to work through your specific case; treat the specifics as a risk picture to confirm with counsel.