Free (commercial use included), fast, and the custom-domain step is the simplest of any host. Our suggested default. ~10 minutes.
New here? Skim README.md first for the values you'll need (fee wallet, factory address, chain). Then come back.
You need the project in your GitHub account first.
- Easiest: follow Use this template — one click makes your copy.
- Or use the Deploy button, which creates the copy and connects Cloudflare in one flow (then skip to step 4).
When you're done you'll have a repo like your-name/my-spectrum-site on GitHub.
- Sign in at dash.cloudflare.com (free account is fine).
- In the sidebar: Workers & Pages → Create → Pages tab → Connect to Git.
- Authorize Cloudflare to see your GitHub, then pick your repo (
my-spectrum-site). - Begin setup.
Cloudflare auto-detects Vite, but confirm these exactly:
| Field | Value |
|---|---|
| Framework preset | Vite |
| Build command | npm run build |
| Build output directory | dist |
| Root directory | leave blank (unless the app lives in a subfolder — see note) |
If the app code sits in a subfolder of the repo (e.g.
app/), set Root directory to that folder. A site generated by Spectrum Mini puts the app at the repo root, so leave it blank.
If your build complains about the Node version, add an env var NODE_VERSION = 20 in the
next step.
Before the first deploy, expand Environment variables (Production) and add the one
value that doesn't travel in the repo (your tier, site URL and fee wallet are committed
in app/src/site.config.json by the setup studio/wizard):
VITE_ALCHEMY_API_KEY = xxxx # required — your RPC key, restricted to your domain (it ships publicly)
Then Save and Deploy. The first build takes a minute or two; you'll get a
*.pages.dev URL.
Added or changed a variable later? Edit it under Settings → Variables and Secrets, then Deployments → … → Retry deployment (or push any change) to rebuild — values are baked at build time.
- Open your Pages project → Custom domains → Set up a domain.
- Type your domain (e.g.
mybaskets.xyz) → Continue. - If your domain's DNS is already on Cloudflare: it's wired automatically — confirm and you're done. If it's elsewhere (e.g. registered at Namecheap/GoDaddy): Cloudflare shows one CNAME record — add it at your registrar's DNS page exactly as shown.
- HTTPS is issued automatically, usually within a few minutes.
- Make the site know its own domain — the step people skip: set the site URL to the
custom domain (setup studio, or
src/site.config.json→siteUrl), commit, and let it redeploy. Until you do, social cards and the sitemap keep advertising the*.pages.devsubdomain instead of your domain.
Now go lock your RPC key to this domain if you added one (see README → RPC keys).
- Deep links 404 (e.g. refreshing
/explorefails). Cloudflare Pages needs a SPA fallback — the kit ships one atapp/public/_redirects(the SPA catch-all plus the nested-route asset remaps; don't replace it with a bare catch-all or refreshing/creator/…,/docs/…and/bundle/…pages goes blank). If deep links 404, check that file reached your repo and the deployeddist/, then redeploy. (See Deep links work out of the box.) - Build can't find
npm/wrong Node. Add env varNODE_VERSION=20and retry. - Wrong output folder. Must be
distfor Vite. A blank page often means the output dir is set to the repo root instead ofdist.