Publishing guide · 8 min read

Your site is ready.How do people find it?

CloudSite builds the website. Cloudflare Pages and Firebase Hosting deliver it to visitors. Both are free to start, need no server and include HTTPS. This guide covers what they are, why we use them, and exactly where to click.

No codingNo serverFree plans are enough to start
CloudSite
Your site is built
Pages, copy and styles are ready
Cloudflare Pages
Recommended
Firebase Hosting
Optional
PublishedHTTPS
https://yourbrand.com
The 30-second version

What are they, really?

Think of CloudSite as the designer and builder, and these services as the global warehouse and delivery network. Once the site files are in the warehouse, visitors pick them up from the nearest location.

1
CloudSite builds the site
AI writes the pages and prepares the files
2
Pick a provider
Cloudflare Pages or Firebase Hosting
3
Visitors open your domain
Global CDN with automatic HTTPS
Cloudflare

Cloudflare Pages

Free hosting on a global CDN

Cloudflare is a global network and security company. Pages hosts your static website files and serves them from data centers close to each visitor.

  • The free plan is enough; static traffic is not metered
  • HTTPS certificates are configured automatically
  • You can start on an xxx.pages.dev address
  • Connecting your own domain is the easiest here
Google

Firebase Hosting

Website hosting by Google

Firebase is Google's app development platform. Hosting stores your site on Google's global infrastructure and delivers it through a CDN.

  • Start on the free Spark plan
  • HTTPS certificates are configured automatically
  • The default address is xxx.web.app
  • Integrates with Google Cloud and Firebase
Less work for you

Why does CloudSite use these two?

Not to make you create another account — they turn the hardest part of going live into a few clicks.

No server to buy

Traditional hosting means renting a server, installing software, configuring Nginx and renewing certificates. These services handle all of it; you only upload the site files.

Fast around the world

Pages are cached close to visitors, which is faster and more reliable than one server in a single location.

Secure by default

Automatic HTTPS, elastic bandwidth and basic attack protection — no certificates, firewalls or scaling to maintain.

Built into CloudSite

Enter credentials once. After that, publishing, domain binding and switching providers are buttons inside CloudSite.

Pick one

Cloudflare Pages or Firebase Hosting?

Short answer: most personal and business sites should start with Cloudflare Pages.

In one line
Cloudflare
Static hosting on a global CDN; the default choice
Firebase
Website hosting inside the Google ecosystem
Account needed
Cloudflare
Cloudflare account (free)
Firebase
Google / Firebase account (free)
What CloudSite needs
Cloudflare
API Token + Account ID
Firebase
Service account JSON key
Default address
Cloudflare
xxx.pages.dev
Firebase
xxx.web.app
Custom domain
Cloudflare
CloudSite creates the CNAME automatically
Firebase
Add the A / TXT records Firebase returns
Access from mainland China
Cloudflare
Usually reachable; more stable with your own domain
Firebase
Default domains are often unreachable; not recommended for mainland audiences
Free tier
Cloudflare
Static requests and bandwidth are not metered
Firebase
Spark has storage and transfer limits; upgrade when exceeded
Best for
Cloudflare
Most business sites, landing pages and blogs
Firebase
Teams already on Google / Firebase with overseas audiences
Difficulty
Cloudflare
★☆☆ Easy
Firebase
★★☆ One extra key step
If most of your visitors are in mainland China, choose Cloudflare Pages. Firebase's *.web.app domains are often unstable or completely unreachable there.
Option A · Recommended

Cloudflare Pages, step by step

Six steps from signing up to a live custom domain. Step 2 is only needed for your own domain; skip it while you preview on pages.dev.

About 5 minutes, plus nameserver propagation
01

Sign up and sign in to Cloudflare

Open the Cloudflare dashboard and sign up with your email. Confirm the verification email, then sign in. If you already have an account, just sign in.

  • The free plan is enough — no paid upgrade needed
  • Turn on two-factor authentication (2FA)
02

Add your domain to Cloudflare (optional)

Only needed if you want your own domain, such as yourbrand.com. If the free pages.dev address is enough, skip to step 3.

  • Click Add a site (may be Add a domain) and enter the bare domain yourbrand.com
  • Choose the Free plan; Cloudflare scans your existing DNS records
  • At your registrar (GoDaddy, Namecheap, Alibaba Cloud, Tencent Cloud…), replace the nameservers with the two Cloudflare gives you
  • Wait for the zone status to become Active — usually minutes, up to 24 hours
  • Check that MX and TXT records came across so email keeps working
Change both nameservers. If DNSSEC is enabled at the registrar, remove the DS record before changing nameservers, or DNS will fail.
dash.cloudflare.com/add-siteDEMO
Add a site
Cloudflare
1Enter your domain
example.com
2Free
Free plan is enough
3Complete your nameserver setup
Replace your nameservers at the registrar
ada.ns.cloudflare.com Copy
bob.ns.cloudflare.com Copy
Use the bare domain — no https:// and no www
03

Create an API token

CloudSite needs a key that can only perform hosting-related actions to create projects, upload files and write DNS on your behalf. That key is a custom API token.

  • Avatar → My Profile → API Tokens → Create Token
  • Choose Custom token → Get started (do not use a template)
  • Name the token CloudSite
  • Add the four permissions shown: Pages Edit, DNS Edit, Zone Read, Account Settings Read
  • Set Zone Resources to All zones and Account Resources to your own account
  • Use a 90-day TTL, then Continue to summary → Create Token
  • The token is shown once — copy it into CloudSite or a password manager immediately
Never use the Global API Key. It has full account access and is dangerous if leaked.
dash.cloudflare.com/profile/api-tokensDEMO
Create a custom token
1Token name
CloudSite
2Permissions
ResourcePermissionLevel
AccountCloudflare PagesEdit
ZoneDNSEdit
ZoneZoneRead
AccountAccount SettingsRead
3Zone Resources
Include · All zones
Account Resources
Include · your account
4Create Token
Only these four permissions — never the Global API Key
04

Find your Account ID

The Account ID is a 32-character hex string, not the token. The fastest place to find it is the browser address bar.

  • The dashboard URL looks like dash.cloudflare.com/32-character-id/home
  • You can also open Workers & Pages and copy the Account ID from the overview footer
  • Anything starting with cfut_ is a token, not an Account ID
dash.cloudflare.comDEMO
The Account ID is in the URL
132-character hex ID
dash.cloudflare.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/home
Click to copy 32-character hex ID
Anything starting with cfut_ is a token, not the Account ID
05

Add it in CloudSite settings

Back in CloudSite, open Settings and find the Cloudflare authorization card.

  • Paste the API token from step 3 into the first field
  • Click Verify. If the token has Account Settings Read, your accounts appear — click one to fill in the Account ID
  • If no accounts appear, paste the Account ID from step 4 manually
  • Click Save credentials; the status should change to Connected
Credentials are stored only on your server. The full value is never displayed again; do not screenshot or commit it.
cloudsite / settingsDEMO
Cloudflare authorization
Connected
1API Token
••••••••••••••••••••••••
2Account ID
a1b2c3d4e5f6...
Verify
Accessible accounts · click to select
My Company
3Save credentials
Verify first, then save
06

Publish and connect your domain

Open the site detail page and click Deploy first. Connect the domain after the first successful deployment, which creates the Pages project.

  • Site detail → Deploy and wait for the log to report success
  • Under Domains, enter shop.example.com or example.com and click Connect
  • CloudSite creates the CNAME to xxx.pages.dev and requests the HTTPS certificate
  • It usually becomes active in 1–5 minutes; the status moves from pending to active
  • Visit https://your-domain.com to confirm
Do not edit or delete the CNAME marked Managed by CloudSite. Apex domains can use CNAME too; Cloudflare flattens it automatically.
cloudsite / sites / my-siteDEMO
DNS after connecting a domain
1Connect domain
shop.example.com
Connect
2DNS
TypeNameValueProxy
CNAMEshop.example.comhome-abc.pages.devProxied
CNAMEwww.shop.example.comhome-abc.pages.devProxied
3 Certificate: active · live
CloudSite creates the CNAME; do not edit it manually

Need deeper Cloudflare troubleshooting?

Permission details, Wrangler import, command-line checks and the full failure table live in the advanced handbook.

Open the Cloudflare handbook
Option B · Google ecosystem

Firebase Hosting, step by step

Firebase adds one step — generating a service account key — but still requires no software. Remember: if your visitors are mainly in mainland China, choose Cloudflare Pages instead.

About 10 minutes
01

Sign in to Firebase with a Google account

Open the Firebase console and sign in with a Google account. Create a free Google account first if you do not have one.

02

Create a Firebase project

Click Create project and enter a project name. The Project ID appears in URLs and must be globally unique.

  • The display name can be anything, for example My Site
  • The Project ID may contain lowercase letters, numbers and hyphens
  • Google Analytics is optional and not required for Hosting
  • Click Create project and wait about a minute
console.firebase.google.comDEMO
Create a Firebase project
Firebase
1Project name
My Site
2Project ID
my-site-2026
3Create project
The Project ID is globally unique and cannot be changed
03

Set up Hosting

In the left menu, open Hosting and click Get started. Complete the wizard once; after that CloudSite can deploy through the API.

  • No Firebase CLI installation needed
  • You can skip the command-line steps in the wizard
04

Enable the Firebase Hosting API

Open the Google Cloud console with the same project selected and enable the Firebase Hosting API. Most new projects enable it automatically; turn it on manually if it is off.

  • Open console.cloud.google.com and select the same project at the top
  • Go to APIs & Services → Library and search for Firebase Hosting API
  • Click Enable
05

Generate a service account key

CloudSite needs a service account key: a JSON file that acts like a robot account password for this project.

  • Firebase console → gear icon → Project settings → Service accounts
  • Choose Firebase Admin SDK and click Generate new private key
  • Download the .json file and copy its entire contents with a text editor
  • Recommended: in Google Cloud → IAM & Admin, grant that service account Firebase Hosting Admin (roles/firebasehosting.admin)
  • An existing Editor role also works, but least privilege is safer
The JSON contains a private key. Treat it like a password: never post it, commit it or upload it to public storage.
console.firebase.google.com/project/my-site-2026/settings/serviceaccountsDEMO
Project settings/Service accounts
Firebase Admin SDKFirebase
firebase-adminsdk@my-site-2026.iam.gserviceaccount.com1Generate new private key
2
service-account.json downloaded
3Recommended IAM role
Firebase Hosting Admin
The key downloads once — save it right away
06

Add it in CloudSite settings

Open Settings → Firebase Hosting projects and paste the full JSON.

  • Optionally add a label such as Main site or Client A
  • Paste the complete JSON, from the first { to the last }
  • Click Add / update project, then Verify connection
  • A successful check shows x / 36 Hosting sites in use
  • If you have several projects, mark the usual one as default
Saving the same project again rotates the key. The private key is never displayed after saving; only the project ID and service account email are shown.
cloudsite / settingsDEMO
Firebase Hosting projects
3 / 36 Hosting sites used
my-site-2026Main site
Project label
Main site
1Service account JSON
{ "type": "service_account", "project_id": "my-site-2026", ... }
2Add / update project3 Verify connection
Paste the full JSON, verify, then set as default
07

Choose Firebase and deploy

Open the site detail page, switch the deploy provider to Firebase, choose a project and deploy again.

  • Site detail → deployment status → choose Firebase
  • Pick the Firebase project for this site
  • Click Deploy; the default address is https://<siteId>.web.app
  • Each Firebase project allows up to 36 Hosting sites — use another project when full
Switching providers does not migrate connected domains; reconnect them on the new provider.
cloudsite / sites / my-siteDEMO
Site deployment settings
Cloudflare Pages
1Firebase Hosting
2Firebase project
my-site-2026
https://my-site-2026.web.app3Deploy
Deploy again after switching providers
08

Connect your own domain

Enter the domain under Domains on the site detail page. Firebase asks for A and TXT records; follow the values shown.

  • Add the type / name / value records at your DNS provider
  • If the domain is in a Cloudflare account already connected to CloudSite, CloudSite tries to add them automatically
  • Turn off Cloudflare's orange-cloud proxy (use DNS only), or certificate validation may fail
  • CAA records must allow pki.goog
  • Wait for the certificate status to become active — minutes to a few hours
Google handles domain verification and the certificate. Failures before DNS propagates are expected.
cloudsite / sites / my-site / domainsDEMO
Add the DNS records Firebase shows
Custom domain
example.com
1DNS
TypeNameValueProxy
TXTexample.comfirebase=my-site-2026DNS only
Aexample.com199.36.158.100DNS only
Awww.example.com199.36.158.100DNS only
2 Certificate: issuing (usually a few minutes)
Turn off Cloudflare's proxy — use the grey cloud

Beginner questions

The places people most often get stuck the first time.

Do I need my own domain?
No. Cloudflare provides xxx.pages.dev and Firebase provides xxx.web.app, both usable immediately. A domain only makes the address easier to remember and more professional; add it later.
Do I need a server or a license/ICP filing?
Neither service needs a server. ICP filing applies to servers hosted in mainland China. Cloudflare and Firebase host outside mainland China and usually need no filing, but access speed there is not guaranteed.
Do I need to write code?
No. You copy a token or JSON, and everything else is buttons inside CloudSite.
Why is Cloudflare recommended by default?
Generous free limits, automatic domain binding, and default addresses that usually work in mainland China. It fits most business sites and landing pages.
Does Firebase work in mainland China?
You can configure and deploy, but *.web.app domains are often unreachable from mainland China. If your customers are there, choose Cloudflare Pages or a mainland-hosted server.
How many sites can one account build?
CloudSite does not limit the number of sites while your plan is active. Cloudflare projects can have multiple domains; each Firebase project supports up to 36 Hosting sites, and you can create multiple projects.
Are the token and JSON safe in CloudSite?
Credentials are stored server-side and never returned in full by the API. Use a 90-day token TTL; if a JSON key leaks, delete it in Firebase and generate a new one.
Can I publish first and add a domain later?
Yes. Go live on the default address and connect your domain from the site detail page whenever you are ready.
What happens if I switch providers?
The site content stays, but you must deploy again. Connected domains do not migrate automatically and must be reconnected on the new provider.

Troubleshooting first

Find the error below. Most issues come down to credentials or DNS.

Cloudflare
Invalid API Token / 401 / 403
Check all four permissions; make sure Account Resources includes your account; generate a new token and save it again.
Cloudflare
Could not route to /accounts/...
The Account ID is wrong, or a token was pasted into it. Copy the 32-character hex Account ID again.
Cloudflare
Zone for the domain not found
Confirm the domain is in Cloudflare and Active; set the token's Zone Resources to All zones.
Cloudflare
522 / 526 after connecting a domain
The certificate may still be issuing; wait 1–5 minutes and set SSL/TLS mode to Full (strict).
Cloudflare
Nameservers stay Pending
Run dig NS your-domain.com; keep only Cloudflare's two nameservers at the registrar and check DNSSEC.
Firebase
Service account authentication failed
Download the JSON again and paste it completely; check the key was not deleted and the Hosting API is enabled.
Firebase
403 PERMISSION_DENIED
Grant the service account Firebase Hosting Admin (roles/firebasehosting.admin) in Google Cloud IAM.
Firebase
Already has 36 Hosting sites
Delete unused Hosting sites or use a different Firebase project.
Firebase
Deploy succeeds but the page is 404
Make sure index.html exists at the site root and deploy again from CloudSite.
Firebase
Domain stays pending
Add the missing A / TXT records; turn off Cloudflare's orange-cloud proxy; allow pki.goog in CAA.

Keep the keys safe: 3 habits

These credentials can publish on your behalf. Following these three rules is enough.

Least privilege

Grant only the four Cloudflare permissions in this guide; give the Firebase service account only Hosting Admin. Never use the Global API Key or Owner.

Rotate regularly

Replace Cloudflare tokens about every 90 days. If one leaks, delete it immediately and create a new one. Delete old Firebase keys in the console.

Never share

Do not screenshot tokens or JSON, commit them to Git or put them in page code. CloudSite stores them only on the server.

Connect your publishing account

Open Settings and paste the credentials using the steps above. When the connection is ready, go back to the site and click Deploy.