Cloudflare setup, step by step
CloudSite publishes sites through your own Cloudflare account. This guide covers the three things you need: hosting the domain on Cloudflare, creating a least-privilege API token, and connecting the domain to your site.
Open Cloudflare API tokens1. Host your domain on Cloudflare
- 01In the Cloudflare dashboard choose Add a site, enter your domain (for example
yourbrand.com) and select the Free plan. - 02Cloudflare shows two nameservers. At your domain registrar, replace the current nameservers with those two values.
- 03Wait until Cloudflare marks the zone as Active. This can take a few minutes or up to 24 hours while DNS propagates.
- 04Review the DNS records Cloudflare imported. Remove conflicting A, AAAA or CNAME records for hostnames you plan to connect to CloudSite.
2. Create an API token
Use a custom token with only the permissions CloudSite needs. Do not use your Global API Key, and do not grant account-wide edit permissions.
| Resource | Permission | Level | Why |
|---|---|---|---|
| Account | Cloudflare Pages | Edit | Create Pages projects and deployments, upload files, add or remove custom domains. |
| Zone | DNS | Edit | Create and update the CNAME record that points your domain to the Pages project. |
| Zone | Zone | Read | List your domains so CloudSite can find the correct zone. |
| Account | Account Settings | Read | Optional. Lets CloudSite list your accounts to fill in the Account ID automatically. |
Under Zone Resources, choose All zones so new domains work without editing the token, or limit it to a specific zone for tighter access. Create the token and copy it immediately — Cloudflare shows it only once. Never commit the token to Git or paste it into a public chat.
3. Find your Account ID
The Account ID is the 32-character hex string in the dashboard URL:
https://dash.cloudflare.com/a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6/homeYou can also find it at the bottom of the Workers & Pages overview. An API token starting with cfut_ is not an Account ID.
4. Connect CloudSite
- 01Sign in to CloudSite, open Settings → Cloudflare and paste the API token and Account ID.
- 02Click Verify. CloudSite lists your Pages projects to confirm the credentials work.
- 03Open a site, deploy it, then add your domain under Domains. CloudSite creates the CNAME record automatically and requests the certificate.
- 04Visit
https://yourbrand.comto confirm the site loads over HTTPS.
Troubleshooting
“Invalid API Token” or 403 errors
“Could not route to /accounts/...”
The domain does not resolve after binding
HTTPS is not active yet
Need the full Chinese walkthrough with screenshots? Open the detailed Chinese guide.