AOV.aiBlack Friday ads cost more. Get more from each order with a free gift.BFCM ads cost more. Get more from each order. Use code FG_BFCM30.Claim 30% OFF

How to Host a Static Website for Free: 3 Hosts Compared

Sam Nguyen16 min read
Summarize this post with AI

You can host a static website for free on GitHub Pages, Netlify or Cloudflare Pages. Each one serves a folder of HTML, CSS and image files at a free address (yourname.github.io, a netlify.app address or a pages.dev address) and lets you connect a domain you own.

Which one fits depends on each host's written terms. GitHub does not allow Pages to run an online business or e-commerce site. Netlify's Free plan stops at 300 credits a month, and Cloudflare Pages serves a root domain such as example.com only after you move its nameservers to Cloudflare.

This guide starts from a folder exported by a desktop builder such as Mobirise or Pinegrow. After comparing the free plans, it walks through each host from the first upload to your own domain.

What you need before you put a static site online

Check four things before you pick a host, so no step fails halfway:

  • A folder with index.html at its top level. GitHub looks for an index.html, index.md or README.md entry file at the top of the folder it publishes, per its guide to creating a Pages site. In Mobirise, the Local drive folder publish option writes this folder to your computer. Keep it unzipped, as Netlify's deploy docs ask.
  • An account on the host you pick. Netlify Drop is the exception: it takes a folder with no account.
  • A domain you own and access to its DNS settings, only if you want your own address instead of the free one.
  • A plan for any server code. GitHub says Pages "does not support server-side languages such as PHP, Ruby, or Python." Netlify and Cloudflare Pages run server-side code as functions written for each platform: Netlify's Functions guide covers TypeScript, JavaScript and Go, and Cloudflare's Pages Functions run on Cloudflare Workers. Plan to replace any PHP script, such as the one behind some contact forms, whichever host you pick.

How GitHub Pages, Netlify and Cloudflare Pages compare on their free plans

The three free plans differ in how you upload, what the plan caps and what your root domain needs:

HostFree addressUpload without GitFree-plan limitsRoot domain setup
GitHub Pagesyourname.github.ioBrowser upload to a public repository1 GB per site; 100 GB bandwidth a month and 10 builds an hour (soft limits)Four A records, or an ALIAS or ANAME record
Netlifyproject-name.netlify.appNetlify Drop, no account needed300 credits a month, spent on deploys, bandwidth, requests and moreALIAS, ANAME or flattened CNAME, or one A record; or Netlify DNS
Cloudflare Pagesproject-name.pages.devDashboard drag and drop, up to 1,000 files500 builds a month; 20,000 files per site; unlimited requests and bandwidthNameservers moved to Cloudflare

Free-plan terms in this table were read on October 30, 2026 on GitHub's Pages limits page, Netlify's pricing page, and Cloudflare's Pages limits page and Pages product page. The upload and domain columns follow the host guides linked in the sections below, read the same day.

For a business site, three terms matter more than any number in the table.

Can you run an online store on GitHub Pages?

No. GitHub's Pages limits page says Pages "is not intended for or allowed to be used as a free web-hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS)." It adds that Pages sites "shouldn't be used for sensitive transactions like sending passwords or credit card numbers."

For a merchant, that rules out a shop or a checkout page on Pages. A portfolio, documentation or personal site fits the rule as written. For anything in between, such as a brochure site for a business, read the rule against what your site does: GitHub draws the line at sites "primarily directed" at commercial transactions.

What happens when Netlify's free credits run out

A Netlify project that reaches its monthly limits pauses until the next billing cycle, and Netlify's pricing FAQ adds: "if one project exceeds its limits, all projects on your account will be paused." Netlify warns you by email and in the app at 50%, 75% and 100% of usage, and upgrading the plan brings paused projects back.

The Free plan's 300 credits a month cover several meters, including production deploys at 15 credits each, bandwidth at 20 credits per GB and web requests at 2 credits per 10,000. The cap also protects you, because Netlify says the Free plan has "hard monthly limits that cannot be exceeded or incur any costs." If your Netlify account dates from before September 4, 2025, you can keep the plan you had, so your limits may differ.

Cloudflare Pages and the move to Workers

Cloudflare's own Pages docs now open with a question, "Are you sure you want to use Pages?", and answer it: "Workers supports most Pages use cases and offers a broader feature set. It is Cloudflare's primary platform for building applications. Start new projects with Workers."

This guide uses Pages anyway: its docs still cover the dashboard drag and drop that a builder's folder needs, and Pinegrow publishes straight to it. Drag and drop is a one-way choice, though: Cloudflare's Direct Upload guide says a drag-and-drop project "cannot switch to Git integration later." If you might deploy from a Git repository one day, plan on a new project for it.

Which free host to pick for a site built in a desktop builder

Pick by what the site is for and where your domain's DNS lives:

  • GitHub Pages fits a portfolio, documentation or personal site, with a soft bandwidth limit of 100 GB a month. GitHub's rules bar online stores, and on GitHub Free the repository behind the site must be public.
  • Netlify takes a first upload with no account, through Netlify Drop. Its Free plan stops at 300 credits a month, and one project over its limit pauses every project on the account.
  • Cloudflare Pages lists unlimited requests and bandwidth on every plan. A root domain such as example.com, however, needs its nameservers moved to Cloudflare, so only a subdomain such as www.example.com can stay at your current DNS provider.

If the site has to take orders, plan the store separately: GitHub forbids it on Pages, and a folder of HTML files brings no cart or checkout of its own to any of the three.

Your builder can narrow the rest of the choice: Mobirise publishes straight to GitHub Pages and Pinegrow to all three. With any other builder, export the folder and follow the manual steps for the host you picked.

How to publish from Mobirise or Pinegrow without leaving the builder

Both builders can publish to a free host from their own Publish button.

Publish from Mobirise

In Mobirise, click Publish in the upper right corner. Mobirise's publishing help page lists four options: .mobirisesite.com (Mobirise's own hosting, "free for tests"; to use it "for your site constantly", you need the Mobirise Site license), Local drive folder, FTP and Github Pages.

The GitHub option appears once you turn on Publish to Github Pages in App Settings (main menu, Account tab). Mobirise's GitHub guide then asks for a GitHub account and a personal access token with repo and workflow scopes, and the site appears at an address like your-username.github.io/folder/. That guide does not cover your own domain, and Mobirise has no Netlify or Cloudflare option, so for those two hosts, publish to a local folder and use the manual steps below.

Publish from Pinegrow

Pinegrow 10 publishes to GitHub, Netlify and Cloudflare Pages, according to its publish docs. Click Publish in the top bar, then Add target, and connect the host account. Review & publish lists the files to upload, the Remote deletions and the excluded files before anything is sent.

Pinegrow's Netlify and Cloudflare targets also offer Create preview deployment, a copy at its own address that leaves the live site alone. For GitHub, turn on Pages for the repository and pick the same branch Pinegrow commits to.

Pinegrow's GitHub target can delete the file that holds your custom domain. When GitHub Pages publishes from a branch, that file is named CNAME and sits at the root of the branch, and GitHub's custom domain troubleshooting page warns that static site generators which force push "can overwrite the CNAME file".

Pinegrow's docs say branch files that are not in your project "are deleted from the branch", so check Remote deletions before you click Commit to repository. If CNAME is listed, cancel. GitHub's fix is to keep the file in what you publish: add a plain-text file named CNAME, holding only your domain name, to the project folder, then review again.

How to host a static website on GitHub Pages

Without Git on the command line, GitHub Pages takes three browser stages (a repository, an upload and a publishing setting), then your domain.

Upload your folder to a GitHub repository

These five steps follow GitHub's guides to creating a Pages site, adding files and choosing a publishing source:

  1. Create a repository. For a site at yourname.github.io, name the repository exactly that, in lowercase. On GitHub Free it must be public. Turn on Add README so the repository starts with a main branch.
  2. On the repository page, open Add file > Upload files and drag in the contents of your builder's folder rather than the folder itself, so index.html lands at the top level. GitHub's upload guide limits browser uploads to 25 MiB per file and 100 files at a time, so a large export goes up in batches.
  3. Commit the files to the main branch.
  4. Go to Settings > Pages. Under Build and deployment, set Source to Deploy from a branch, choose main and the root folder (/), and click Save, as GitHub's publishing source guide describes.
  5. Back on Settings > Pages, click Visit site. GitHub says changes can take up to 10 minutes to publish.

GitHub warns that Pages sites are public on the internet, so remove anything private from the folder before you upload it.

Connect your own domain to GitHub Pages

Add the domain to your Pages site before you point its DNS records at GitHub: GitHub's custom domain guide warns that the other order could let someone else host a site on one of your subdomains. Follow these five steps:

  1. Recommended first: verify the domain in your profile's Settings > Pages with a TXT record, which stops other GitHub users from taking it over.
  2. In the repository, go to Settings > Pages, type the domain under Custom domain and click Save. When you publish from a branch, this commits a CNAME file to that branch.
  3. At your DNS provider, point the root domain with four A records (185.199.108.153, 185.199.109.153, 185.199.110.153 and 185.199.111.153) or with one ALIAS or ANAME record to yourname.github.io.
  4. Add a CNAME record for www that points to yourname.github.io. GitHub recommends setting up both, and it then redirects one to the other automatically.
  5. When the option becomes available, tick Enforce HTTPS on the same Pages settings page.

GitHub says DNS changes can take up to 24 hours. It requests the HTTPS certificate from Let's Encrypt for you, per its HTTPS guide, and its troubleshooting page says HTTPS can take up to an hour after the domain is set. Our guide to pointing a domain to hosting explains how A, CNAME and ALIAS records work with any DNS provider.

How to host a static website on Netlify

Netlify Drop skips the dashboard at first: drop the folder, check the site, then claim it and add your domain.

Drag your folder onto Netlify Drop

Netlify's deploy docs call Netlify Drop "the simplest way to publish a site: drag and drop a folder of files and it goes live instantly, no account required." Four steps put a builder's folder online:

  1. Open Netlify Drop at app.netlify.com/drop.
  2. Drag the folder that holds index.html onto the drop zone. Without an account, Netlify publishes the files as they are.
  3. Open the link Netlify gives you and click through the pages. The Drop page says every dropped project gets a public link by default.
  4. To keep the site and change it later, sign up and claim the project, as the Drop page invites you to.
Netlify Drop page with the heading Drag & drop to publish instantly and a drop zone that reads Drop here, or choose a file, folder, or start from an example

On a newer, credit-based account, Netlify's deploy docs add that if your team has private by default turned on, new projects "start private no matter how you create them". Make the project public in the dashboard before you share the link.

Connect your own domain to Netlify

Add the domain to your Netlify project under Domain management first, then choose one of Netlify's two routes:

  • External DNS, where you keep your current DNS provider. Per Netlify's external DNS guide, a www or other subdomain gets a CNAME record pointing to project-name.netlify.app. A root domain gets an ALIAS, ANAME or flattened CNAME record pointing to apex-loadbalancer.netlify.com, or, if your provider supports none of those, an A record pointing to 75.2.60.5. When you add the root or www, Netlify adds the other automatically, so set up records for both. With external DNS, Netlify recommends a subdomain such as www as your primary domain.
  • Netlify DNS, which Netlify's domain setup wizard labels "Most recommended". You replace your domain's nameservers with Netlify's. Its Netlify DNS guide says to copy existing records, "such as MX records for email service", to Netlify DNS first, so email keeps working through the change.

Netlify says DNS settings can take a full day to spread. Its HTTPS guide says Netlify provisions a Let's Encrypt certificate automatically once you add a custom domain; you can check its status under Domain management > HTTPS.

How to host a static website on Cloudflare Pages

Cloudflare Pages needs a free Cloudflare account (its product page says no credit card is required) and takes your folder through the dashboard. Most of the work comes at the domain step.

Upload your folder in the Cloudflare dashboard

Cloudflare's Direct Upload guide describes the drag-and-drop route in four steps:

  1. In the Cloudflare dashboard, go to Workers & Pages.
  2. Select Create application > Get started > Drag and drop your files.
  3. Enter a project name. The site is served at project-name.pages.dev, and Cloudflare's known issues page says that address cannot be changed later without deleting the project, so choose the name with care.
  4. Drag in your folder, or a zip of it, and select Deploy site.

Drag and drop takes up to 1,000 files of up to 25 MiB each; Wrangler, Cloudflare's command-line tool, takes 20,000. A file over the size limit gets a red warning and cannot be replaced on its own, so you re-upload the whole project after fixing it.

Connect your own domain to Cloudflare Pages

Start in your Cloudflare Pages project: open Custom domains, select Set up a domain, enter the domain and select Continue. What happens next depends on the kind of domain, per Cloudflare's custom domains guide:

  • Root domain (example.com): the domain must be a zone in your Cloudflare account with its nameservers pointed to Cloudflare. Once they are, Cloudflare creates the CNAME record for you.
  • Subdomain (www.example.com or shop.example.com): it can stay at your current DNS provider with a CNAME record pointing to project-name.pages.dev. Add it through Set up a domain first, because a CNAME created by hand without that step fails with a 522 error.

Check your DNS records before you move the nameservers. Cloudflare's full setup guide says its quick scan can add your existing records but "is not guaranteed to find all existing DNS records", and it lists email records among those to check, so confirm your MX records are in the new zone before you switch. If DNSSEC is on at your registrar, turn it off there first.

A nameserver change can take up to 24 hours. Cloudflare's known issues page notes that a custom domain will not verify until Cloudflare can validate a certificate request for it. Once it verifies, HTTPS needs no setup of your own: Cloudflare's product page lists SSL "out of the box".

How to update your free site and confirm HTTPS after launch

Each later change goes back through the route you used to publish:

  • GitHub Pages: upload the changed files and commit them, or publish again from Mobirise or Pinegrow.
  • Netlify: drag the updated folder onto the drop zone at the bottom of the project's Deploys page, or publish again from Pinegrow. Each production deploy draws on the Free plan's monthly credits.
  • Cloudflare Pages: open the project, select Create a new deployment, choose production and drag in the updated folder, or publish again from Pinegrow.

Pinegrow sends only new and changed files after the first publish, whichever of the three hosts you publish to.

Once the domain is live, run three checks:

  • Open the site with https:// and your domain on a phone as well as a computer.
  • On GitHub, confirm that Enforce HTTPS is ticked and the CNAME file is still in the repository.
  • Look for mixed content: GitHub's HTTPS guide explains that a page still loading images, CSS or scripts over http:// serves mixed content, and the fix is to change those links to https:// in your HTML.

Publish your folder on the host you picked today, then connect your domain with that host's records above. If you later move to a traditional web host that takes FTP, our guide to uploading a website with FTP or SFTP covers that route.

Sources

Frequently Asked Questions

Can I host a static website for free?

Yes. GitHub Pages (with a public repository on GitHub Free), Netlify's Free plan and Cloudflare Pages all put a folder of HTML, CSS and image files online at no cost. Each gives the site a free address and lets you connect a domain you own.

Their limits differ. GitHub does not allow Pages to run an online business or e-commerce site, and Netlify's Free plan stops at 300 credits a month. Cloudflare Pages serves a root domain only after you move its nameservers to Cloudflare.

What is the cheapest way to host a static website?

Use one of the three free plans and pay only for a domain name, if you want your own address. Netlify says its Free plan has "hard monthly limits that cannot be exceeded or incur any costs", so a site that goes over pauses instead of running up a bill. GitHub says a Pages site over its usage limits may not be served, or you may get an email from GitHub Support suggesting ways to reduce its load. Cloudflare's Pages product page says you can start for free with no credit card.

How much does it cost to host a static website?

Nothing on the free plans of GitHub Pages, Netlify and Cloudflare Pages. The usual cost is the domain name you buy from a registrar. A paid plan becomes necessary when the site outgrows a free plan's limits or needs something the free plan lacks, such as a GitHub Pages site published from a private repository. Our guide to what it costs to host a website covers paid hosting.

How to temporarily host a website for free?

Drag the folder onto Netlify Drop: it goes live without an account, and the Drop page says the link is public by default. To keep the site or change it later, sign up and claim the project, as the Drop page invites you to.

Mobirise users can also publish to Mobirise's own .mobirisesite.com hosting, which Mobirise calls "free for tests". To use it "for your site constantly", Mobirise says you need the Mobirise Site license.

Share this post:
BFCM 2026Deals across Avada appsNov 27–30