Loading
Live demos

Publish your website for free, from a folder on your computer

This is for anyone whose website is a folder of files: an index.html at the top, with the styles, scripts, pictures and fonts beside it. Hand-written sites and static exports look like that. So does a Promti kit once you unzip its download, which carries this guide inside.

Time
5 minutes
Cost
Free

By the end, the site is online at an address ending in .pages.dev, on Cloudflare’s free plan, and you know how to replace it with a new version. The upload itself takes minutes; checking the folder first is what saves you a second attempt.

Hosting costs nothing. Cloudflare doesn’t charge for requests to static files on any plan, so money only comes into it later, if you want your own domain or a mailbox at it.

Before you start

  • The site’s folder, or a .zip of it, with index.html at the top level rather than tucked into a subfolder.
  • An email address for your Cloudflare account, and the computer where the folder is saved.
  • A project name you’d be happy to see in the address, because it becomes the first part of your-name.pages.dev.
  • If the folder holds video or 3D models, the size of the largest files: the upload has a limit per file, given in the steps.

Step by step: put your site online

  1. Have the file you downloaded at hand: Cloudflare takes the .zip as it is, or the folder inside it (index.html and the rest).
  2. Go to dash.cloudflare.com and create a free account (or sign in).
  3. Open Workers & Pages and click Create application. The page starts with Workers: click Get started where it offers Pages, then Drag and drop your files.
  4. Name the project — your business, lowercase, with dashes — drop the .zip or the folder in and click Deploy site. (It takes up to 1,000 files of 25 MiB each.)
  5. It’s live at your-name.pages.dev in a moment. To change it later: open the project, Create a new deployment, choose Production and drop the new version.

At the end: Your site is online, fast everywhere, with HTTPS.

Any host that serves plain files works too (Netlify, your own server…): upload the folder’s contents. Check that its plan allows a business site — Vercel’s free plan, for one, is for non-commercial use only.

What the free plan gives you

Cloudflare lists unlimited requests and bandwidth on every Pages plan, the free one included. Its documentation adds that requests to static assets are free and unlimited on all plans, and a site made only of files uses nothing else.

The limits are about files, not visitors. A site on the free plan can hold up to 20,000 files, and no single file may exceed 25 MiB. Dragging a folder into the dashboard is capped at 1,000 files; past that, Cloudflare’s command-line tool, Wrangler, uploads the full 20,000.

One account can run up to 100 Pages projects, each with up to 100 custom domains on the free plan.

Other hosts that take the same folder

Any service that serves plain files can host it. What differs is the small print of each free plan.

Netlify also accepts a dragged folder. Its free plan comes with 300 credits a month: every production deploy uses 15, and every GB served uses 20. When an account hits its limit, Netlify pauses its sites until the next billing cycle.

GitHub Pages is free, with a 1 GB cap per site and a soft limit of 100 GB of bandwidth a month. GitHub also states that it isn’t meant to be free hosting for an online business or a shop.

Vercel’s free Hobby plan is limited to non-commercial, personal use; a business site needs its Pro plan, listed at $20 a month.

What can go wrong, and the fix

The address shows an error instead of your home page. Check whether index.html has ended up one level down, which happens when you drag the folder that contains your site’s folder. Upload again with the right one.

A file has a red warning beside it. It was too large and didn’t upload. Cloudflare lets you drop it from the upload but not swap it for another, so shrink the file and upload the whole project again.

Your update doesn’t show. A new deployment can go to production or to a preview, and a preview leaves the live site untouched. Pick production.

The address has a few extra characters. The name was already taken, so Cloudflare added random ones to make it unique. Once your own domain is connected, that’s the address people will use.

One choice is final: a project created by uploading can’t switch to deploying from Git later; you’d need a new project.

Once it’s live

With the site live, the next guides cover a domain of your own, an email address at it, and telling Google the site exists.

To see a folder online without an account first, there’s Cloudflare Drop (cloudflare.com/drop): it keeps the upload live for an hour, and you claim it with an account to keep it. It creates a Worker, not a Pages project, so the domain steps won’t match it.

Questions

Is it really free for a business website?
For a site made of files, yes: on the free plan you pay nothing for requests or bandwidth. What may cost money is a domain, plus a mailbox if you want to send email from it.
Do I need a credit card to start?
No. Cloudflare’s own pages say you can start building for free, with no credit card required. It will ask for a payment method when you buy something, such as a domain.
How many visitors can the site take?
Cloudflare sets no number for static files: requests to them are unlimited, on the free plan as well. The limits you might meet are the file count and the size of each file.
Can I put a WordPress site on Cloudflare Pages?
No. WordPress needs a server that runs PHP and a MySQL or MariaDB database, while Pages serves files. This route suits sites that are already plain HTML, CSS and JavaScript.
Cloudflare’s docs say to start new projects with Workers. Should I?
The note on the Pages docs presents Workers as Cloudflare’s main platform for building applications. For a folder of files, Pages’ drag and drop is still documented, and it’s what the steps here use.
Does the .pages.dev address stay once I add my domain?
Yes, both work side by side. If you want a single address, Cloudflare explains how to send the .pages.dev one to your domain with Bulk Redirects.