· 5 min read

Deploy a Static Site to Cloudflare in 5 Minutes

This is the fastest path from a folder of HTML files to a live HTTPS URL on Cloudflare's global network. No build tools. No credit card required.

What you need

  • A folder with at least index.html at the root
  • Git installed on your computer
  • A free GitHub account
  • A free Cloudflare account

Download a LaunchStatic template from our templates page if you do not have files ready yet.

Minute 1: Prepare your files

Open your project folder and confirm the structure. Cloudflare Pages serves files from your repository root, so index.html must sit at the top level — not inside a subfolder.

my-landing/
├── index.html
├── assets/
│   ├── css/main.css
│   └── js/main.js
└── images/ (optional)

Open index.html in a browser locally (double-click the file or use a simple local server). Fix any broken image paths or CSS links before pushing. Use root-relative paths like /assets/css/main.css so they work after deployment.

Minute 2: Push to GitHub

Create a new repository on GitHub. Name it something like my-saas-landing. Keep it public. Do not add a README, .gitignore, or license — you will push existing files.

In your terminal, run:

cd path/to/my-landing
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/my-saas-landing.git
git push -u origin main

GitHub may prompt you to authenticate. Use a personal access token or GitHub CLI if HTTPS login fails. Once the push completes, refresh your repo page — you should see your files listed.

Minute 3: Create the Cloudflare Pages project

  1. Go to dash.cloudflare.com and log in.
  2. Click Workers & Pages in the sidebar.
  3. Click Create application, then the Pages tab.
  4. Click Connect to Git and authorize Cloudflare on GitHub.
  5. Select the repository you just created.

Cloudflare will ask for build configuration. This is the step where most first-time deploys fail — so pay attention:

  • Framework preset: None
  • Build command: leave completely empty
  • Build output directory: /

Click Save and Deploy. Cloudflare clones your repo and uploads the files. The first deploy usually finishes in 30–60 seconds.

Minute 4: Verify the deployment

When the deploy status shows Success, click the generated *.pages.dev link. You should see your landing page with styles and images loading correctly.

If you get a 404:

  • Confirm index.html exists at the repo root (not nested in a folder)
  • Confirm build output directory is / and not /dist or /public
  • Check the deployment log in Cloudflare for errors

Test on your phone over cellular data. Static pages on Cloudflare's CDN should load almost instantly worldwide.

Minute 5: Set up auto-deploy and optional custom domain

Auto-deploy is already configured. Every git push to main triggers a new production deployment. Try it:

# Edit a headline in index.html, then:
git add .
git commit -m "Update headline copy"
git push

Watch the new deployment appear in your Cloudflare Pages dashboard. When it goes green, refresh your live URL to see the change.

To add a custom domain later:

  1. In your Pages project, open Custom domains.
  2. Click Set up a custom domain and enter your domain.
  3. Add the CNAME record Cloudflare shows you at your registrar.
  4. Wait for SSL to provision (usually under 15 minutes).

What you just built

You now have a production static site with free SSL, global CDN caching, unlimited bandwidth on the free tier, and Git-based continuous deployment. No server to manage, no PHP version to worry about, no plugin updates.

When you are ready to capture emails, wire your form to Formspree. When you want analytics, add a single script tag from Umami or Plausible. The HTML foundation you deployed today will not need to change.