Put a website online with Cloudflare

Two simple ways for students to share a finished website: a permanent address in about 5 minutes (Option A), or a temporary link straight from their own computer for a quick look (Option B). No code needed for either.

Option A · A permanent address with Cloudflare Pages free plan available

For a finished website folder (index.html and its files). The result is a link like https://my-portfolio.pages.dev.

Before you start

  1. Sign in at dash.cloudflare.com and open Workers & Pages in the left menu.
  2. Click Create application, then Get started, then Drag and drop your files.
  3. Type a project name. It becomes your address: my-portfolio gives my-portfolio.pages.dev.
  4. Drag your folder or .zip into the upload box.
  5. Click Deploy site. When the upload finishes, click Save and Deploy, then open your project.
  6. Your site is live at https://<project-name>.pages.dev. Share that link.

Update your site later: open the project, click Create a new deployment, choose Production, and upload the new folder.

If something goes wrong

Good to know: a project created this way can't be switched to automatic Git deploys later; for that, create a new project from Git. Menu names in the Cloudflare dashboard may change slightly; if a name differs, look for the option to upload your files directly (Direct Upload).

Option B · A temporary link from your own computer (Quick Tunnel) testing only

If the website is already running on your own computer, Cloudflare can give it a temporary public https link, with no account and no domain. It is handy for showing someone a site that is still being built.

  1. Install cloudflared. On macOS: brew install cloudflared. On Windows: download the latest release from GitHub (install page).
  2. Start your site locally. The example below uses http://localhost:8080.
  3. In a terminal, run:
    cloudflared tunnel --url http://localhost:8080
  4. Open the trycloudflare.com link that cloudflared prints, and share it.

Limits, as Cloudflare states them

Which one? Use Option B to show work in progress for a short time. Use Option A when the site is finished and you want a link that keeps working after the computer is switched off.

Want it done for you? The cf-publish-starter kit (free, open source, MIT) sets up both options: npm run publish for a Cloudflare Pages site and npm run share for a Quick Tunnel link. Its README has step-by-step instructions in Vietnamese and English.