Blog

How to Host a Website for Free Using Cloudflare Pages

How to host a website for free using Cloudflare Pages in 2026 — from upload to live, connecting a custom domain (.com.np or .com), deploying from Git, and troubleshooting common issues.

Cover illustration for How to Host a Website for Free Using Cloudflare Pages

If you want to host a website for free in Nepal, Cloudflare Pages is one of the best options in 2026. It’s fast (runs on Cloudflare’s global edge), includes free SSL, supports custom domains, and you can go live in minutes. This guide shows you how to deploy a static site and connect your .com.np or .com domain.

What you can host for free

Cloudflare Pages is designed for static sites — plain HTML/CSS/JS, and sites built with static-site generators (Astro, Hugo, Eleventy, etc.). If your site is pure static files, it’s perfect. If you need a backend server, Pages isn’t the right fit.

Method 1 — Drag-and-drop (fastest, no Git)

  1. Zip your static site files. Make sure there’s an index.html in the root of the zip.
  2. Go to the Cloudflare dashboard → Workers & Pages → Create application → Pages tab.
  3. Choose Upload assets.
  4. Drag and drop your zip file and follow the prompts.
  5. You’ll get a free *.pages.dev URL immediately.

This is ideal for a first-time site or a one-off upload.

  1. In Workers & Pages → Create application → Pages → Connect to Git.
  2. Authorise Cloudflare to access your GitHub/GitLab repository.
  3. Select your repo and branch.
  4. Configure build settings. For plain HTML, use Build command exit 0 and set the Output directory to the folder containing your built files (often ./ or dist/).
  5. Deploy. Cloudflare will build and deploy, and give you a *.pages.dev URL.
  6. Every push to the branch creates a preview deployment you can test before merging to production.

Connecting a custom domain

Once your site is live on *.pages.dev:

  1. In your Pages project → Custom domains → Set up a custom domain.
  2. Enter your domain name (e.g. yourname.com.np or yourname.com).
  3. Follow the prompts. Cloudflare will automatically add the required DNS record if your domain is on Cloudflare. If not, it will show you the record to add at your DNS provider.

For a .com.np domain: after approval on register.com.np, you can update nameservers to Cloudflare or add the CNAME/Alias records shown by Pages. Both work; using Cloudflare nameservers gives you extra benefits.

Common issues and fixes

Issue Fix
404 on root URL Missing index.html at the root of your uploaded files. Add it and redeploy.
Custom domain stuck verifying Check DNS propagation; if using Cloudflare, ensure the proxy status is correct. Also check for zone holds.
CSS/JS not loading Check relative paths. For static sites, use relative paths or ensure your base path is correct.
Old content shows Purge cache or wait a moment; Cloudflare serves cached versions but Pages invalidates on new deploys.

Tips for a smooth launch

  • Test on mobile. Most Nepali traffic is mobile; check responsiveness.
  • Add to Google Search Console. After going live, submit your site — see submit your website to Google Search Console.
  • Use preview deployments. If using Git, test every change on its preview URL before merging.
  • Keep it simple. A fast, clean static site ranks and loads better than an overcomplicated one.

The bottom line

Cloudflare Pages is the cheapest and fastest way to host a static website in Nepal for free. Upload your files (or connect Git), get a *.pages.dev URL, connect your custom domain with free SSL, and you’re live. For a .com.np domain, pair it with this — see how to register a free .com.np domain if you haven’t already.

Fact-checked September 2026 against Cloudflare Pages documentation. Features can change over time; confirm current details. General information.

Frequently asked questions

Is Cloudflare Pages really free?
Yes. The free plan includes free hosting for static sites, unlimited bandwidth on most typical sites, previews on pull requests, and support for custom domains with free SSL.
Can I use Cloudflare Pages with a .com.np domain?
Yes. Once your .com.np is approved, add it as a custom domain in Pages and update DNS as instructed.
Do I need to know Git to use Cloudflare Pages?
No. You can drag-and-drop a zipped folder to deploy directly. Connecting to Git is better for ongoing updates but not required for a first site.
What kind of sites can I host for free?
Static HTML, CSS, JS sites, and most static-site generators (Astro, Hugo, Eleventy). Dynamic server-side code needs a different approach.
How long does deployment take?
Usually seconds for a small site. Git-based builds take a bit longer depending on the framework.
What if I get a 404 on my pages.dev URL?
Usually a missing `index.html` at the root of your uploaded files. Add an `index.html` file and redeploy.

Sources & further reading

  1. Cloudflare Pages — docsdevelopers.cloudflare.com
  2. Cloudflare — official sitecloudflare.com
  3. register.com.np — .com.np domainregister.com.np
  4. GitHub Pages — docsdocs.github.com
  5. Google Search Consolesearch.google.com

Get new guides in your inbox

One email when a new guide goes up — freelancing, payments, AdSense and remote work from Nepal. No spam, unsubscribe any time.