Pages (static sites)

Upload a folder.

A Pages site is served from every location we run, on a hostname you own. There is no subdomain of ours — see the first section for why that is a decision rather than a gap.

01

Your domain, always

A Pages site is served only on a hostname you own. We do not offer a subdomain to publish on, and we are not going to.

Arbitrary user content under our own name would put every service we run behind a single browser blocklist entry — the console, the identity provider, the status page, and the public resolver other people's devices depend on. Your domain carries your reputation, which is where it belongs.
02

Which tier

The difference is not size. It is what happens when something else breaks.

StoreEdge
Where the files areHeld centrally; each location caches them on first useCopied onto every location
Origin fetchOnce per location per fileNever — there is no origin
Size50 MB, 5000 files5 MB, 200 files
Good forSites with real contentLanding pages, documentation, redirects

Use store unless the site is small and you want it to stay up through anything. The edge tier's limits are small precisely because every location holds a copy.

03

Deploy it

  1. In the console open CDN → Pages and create a project, choosing a tier.
  2. Press Upload and pick the folder your site is built into. The folder's own name is not part of the site — index.html has to be at its top.
  3. Point a hostname at it: on the Shield site, choose this project as where the content comes from.

From a script instead, a deploy is three calls: start it, PUT each file into it, finish it. The API reference has the shapes.

curl -X POST -H "Authorization: Bearer orb_…" \
  https://dash.yunzheng.space/api/v1/pages/projects/7/deploys

curl -X PUT -H "Authorization: Bearer orb_…" --data-binary @dist/index.html \
  https://dash.yunzheng.space/api/v1/pages/projects/7/deploys/12/files/index.html

curl -X POST -H "Authorization: Bearer orb_…" -d '{"activate":true}' \
  https://dash.yunzheng.space/api/v1/pages/projects/7/deploys/12/finish
04

Going back

Every upload is a deploy, and a finished deploy never changes. Making an earlier one live again is instant: nothing is copied and nothing is rebuilt, because the deploy is part of where its files are stored — only a pointer moves. The edge is told to drop its cache at the same moment, so the change is visible straight away rather than when the last cached file happens to expire.

05

File conventions

Path asked forWhat is served
/index.html
/docsdocs, then docs.html, then a redirect to /docs/
/docs/docs/index.html
anything missing404.html, with a 404 status
A directory asked for without its trailing slash is redirected rather than served. Serving the content there would make every relative link on the page resolve one level too high, which is the kind of breakage that only shows up on the second page.

_redirects takes one rule per line: /from /to 301. A trailing /* matches a prefix and :splat carries the rest. Status 200 rewrites without changing the URL, which is how a single-page app serves its own routes.

_redirects
/old-page   /new-page      301
/blog/*     /articles/:splat  301
/app/*      /index.html    200

_headers sets your own response headers, a path pattern followed by indented lines. Headers that would rewrite what the edge decided — the length, the connection, cookies — are ignored.

_headers
/*
  X-Frame-Options: DENY
  Referrer-Policy: no-referrer

/assets/*
  Cache-Control: public, max-age=31536000, immutable
06

Questions

Is there a build step?

No. You upload the finished files, so build wherever you already build — the output is what we serve.

What happens to the old deploy?

It stays, so going back to it is a single action. Only the pointer to the live one moves.

Can one project serve several hostnames?

Yes. Point as many of your hostnames at it as you like; they all serve the same live deploy.

Next

Related

Getting started

How an Orbit account is organised, what lives where in the console, and the shortest path from signing in to serving a name from our network.

DNS hosting

Add a zone, point your registrar at our name servers, and manage records. Includes weighted answers, health-checked records, ALIAS at the apex and zone-file import.

Connect a hostname

Delegate the whole domain, delegate one hostname, or add a CNAME and leave your DNS where it is. What each one costs you and when to pick it.

← All documentation