Build and Launch a Website with AI
Deploy a Static HTML Site to Cloudflare Pages with Direct Upload
Publish a folder or ZIP of prebuilt HTML to Cloudflare Pages using your browser. Check the live URL, fix missing files, add a custom domain, and update the same project.

Cloudflare Pages Direct Upload can publish an HTML folder or ZIP to a pages.dev address from your browser. Open the archive before you drag it in. Its top level should hold index.html alongside the folders that contain your styles, scripts, and images.
Use this walkthrough if you manage a Pages project or specifically want a pages.dev address. Cloudflare now recommends Workers Static Assets for new static sites and offers a browser uploader there as well. The Workers & Pages dashboard can open on the Workers creation screen. Look for the link to continue to Pages if you want this workflow. Pages Direct Upload · Workers Direct Upload
A plain HTML export is ready once its links and assets work. If your download has package.json and src/, inspect its build settings. For a typical Vite project with dependencies installed, run npm run build and upload the output folder, usually dist/. Direct Upload serves the files you give it, so you need to finish the build first.
Here is a small portfolio layout with a real second page and a custom error page.
index.html
about/index.html
assets/site.css
404.html
Save the following as index.html. Copy it to about/index.html and change the heading to “About this site” and the link to /. Make a similar copy at 404.html with a “Page not found” heading and a link home.
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Studio Field Notes</title>
<link rel="stylesheet" href="/assets/site.css">
<main>
<h1>Studio Field Notes</h1>
<p>Site version v1</p>
<a href="/about/">About this site</a>
</main>
</html>
For a visible stylesheet check, save body { margin: 3rem; font-family: system-ui; background: #f5f2ec; } in assets/site.css. If you make a ZIP, select the contents of the folder. Use unzip -Z1 site.zip on macOS or Linux to list the entries. Repack the archive if the entry reads site/index.html, or drag the site folder itself into the dashboard. Remove .env files, keys, and private material from the upload.
- In Workers & Pages, select Create application. Continue to Pages and choose Drag and drop your files.
- Give the project a name, add the folder or ZIP, and complete the deployment. Cloudflare assigns the production address. If the project name is already taken, copy the address shown for your project.
- Open the HTTPS production URL in a private browser window. Check the home page, load an image, and refresh an inner page. If you eventually want Pages to build on every Git push, create a separate Git-integrated project. Cloudflare’s upload steps
Check one stylesheet request in your browser’s Network panel. A successful CSS response should have status 200 and a text/css content type. A 200 carrying text/html can be the home page served by the fallback. Verify the filename, its capitalization, and the contents of the upload.
| Symptom | Where to look |
|---|---|
The pages.dev home page returns 404 | Look for index.html at the upload root. For Vite, check the actual build output. |
| Text appears with no styling | Open /assets/site.css directly and check its response type and exact path. |
Refreshing /about/ shows the home page | Make sure about/index.html was uploaded. A root 404.html gives unmatched routes a proper error page on a multipage site. |
| A React route returns 404 after a refresh | Check for a top-level 404.html. It takes precedence over the fallback that serves the SPA entry point. |
The ZIP and routes were checked with Wrangler’s local Pages preview. With the root 404.html in place, the real stylesheet returned 200 text/css and a missing stylesheet returned 404 text/html. After removing the error page in a separate copy, the missing stylesheet URL returned the home page and 200 text/html. The dashboard workflow, domain setup, and plan details come from Cloudflare’s documentation, checked December 4, 2026. How Pages serves routes
Cloudflare charges nothing for static asset requests that do not invoke Pages Functions and sets no request cap on those assets. The dashboard uploader accepts up to 1,000 files per upload and 25 MiB per file. Free Pages sites can hold up to 20,000 files, subject to the upload method. For a larger folder, Wrangler can upload prebuilt assets from a directory. Upload limits · Pages plan limits
If you add an API or form handler that runs Pages Functions, those requests count toward Workers usage. Domain registration and renewal are separate from serving your pages. Check the relevant costs before you add either. Pages Functions pricing
Open Custom domains inside your Pages project and add the hostname.
- For
portfolio.example.com, you can keep your existing DNS provider. Associate the hostname with the project, then set a CNAME pointing to the project’spages.devaddress as instructed. - For
example.com, add the domain as a zone in the same Cloudflare account and point its nameservers to Cloudflare. Review existing mail and service records before changing who manages DNS.
Check both addresses over HTTPS. If pages.dev works and the custom domain shows a 522, check that the hostname is associated in the Pages dashboard and that its DNS record points to the project. Custom domain setup · DNS and HTTPS checklist
Choose Create a new deployment in the existing project. Upload the complete new output. Pick Preview to review it, then deploy the checked files to Production. Anyone with a preview link can open it by default. Set up access control before sharing a preview that contains private material. Preview deployments
If a release breaks the live site, use the rollback action on an earlier successful production deployment. Keep a copy of each release if you need to recover beyond the platform’s deployment retention window. After a rollback, check the version text on the production hostname and reopen the stylesheet and an inner page. Pages rollbacks · Troubleshoot a site that still shows an old version
If you are still picking a browser-based uploader, compare the same folder against the Netlify Drop publishing workflow.
Next step: compare the actual plans
Filter the listed plans by budget, specifications and region, or start with a buying guide.