Where to host your website: free options, real costs and setup guide
The best place to host your website depends on what your site actually does: a simple HTML, portfolio or documentation site can be hosted for $0 on Cloudflare Pages or GitHub Pages, a traditional blog or business site fits managed WordPress or shared hosting, and a dynamic web app with accounts, a database and payments fits a serverless platform such as Cloudflare Workers or a managed PaaS.
Most beginners get stuck because hosting comparison articles treat every website like a WordPress blog. This guide breaks hosting down by website type, explains what "free website hosting" actually covers, compares real monthly costs (including paying someone to host it for you), and gives you step-by-step instructions to launch both a static site and a full-stack site.
Step 1: Match your website type to the right hosting category
Before comparing brand names, identify which of the three buckets your website belongs to. Choosing the wrong bucket either wastes money on servers you do not need or forces you to migrate months later.
| Website type | What it includes | Recommended hosting category | Examples |
|---|---|---|---|
| Static site | HTML/CSS/JS, portfolios, landing pages, docs, Astro/Hugo/Eleventy sites | Static / edge hosting | Cloudflare Pages, GitHub Pages, Netlify, Vercel |
| Content / CMS site | Blogs, local business sites, WooCommerce stores | Managed CMS hosting or shared hosting | Managed WordPress hosts, standard shared hosts |
| Dynamic app / SaaS | User logins, database writes, payments/subscriptions, private file downloads, background jobs | Serverless full-stack or PaaS / VPS | Cloudflare Workers + D1/PostgreSQL + R2, Render, Fly.io, Railway, VPS |
If you are building your first simple website (a resume, portfolio or product landing page), start with static hosting. You do not need to rent a Linux server or pay for shared cPanel hosting just to serve HTML and CSS.
Can you host a website for free?
Yes—for static websites and small hobby projects, free hosting is reliable enough for real production traffic. For dynamic sites with databases and file storage, free tiers are great for launching and testing, though growing traffic or commercial features eventually require a paid usage plan.
Here is what free hosting actually covers and where limits appear (as of November 2026; check each provider’s current pricing page before committing):
- Static edge hosting ($0/month): Cloudflare Pages and GitHub Pages let you connect a Git repository, deploy automatically on push, and attach a custom domain with free HTTPS. GitHub Pages is restricted to static files and public repositories on the free tier; Cloudflare Pages supports static assets and Functions with generous bandwidth limits.
- Serverless / full-stack free tiers ($0 to start): Cloudflare Workers (with D1 SQLite database and R2 object storage) offers a free tier suitable for prototypes and low-traffic apps, with paid usage starting at a low monthly base plus pay-as-you-go metering. Platforms like Vercel, Netlify and Render also have free tiers, though some restrict commercial use or put idle backend servers to sleep.
- What is almost never free:
- Custom domain name: Expect roughly $10–$15 per year for a
.com(free plans otherwise give you a subdomain likeyoursite.pages.devorusername.github.io). - Transactional email at scale & payment fees: Sending account emails or accepting card payments involves third-party provider fees once you have active customers.
- Custom domain name: Expect roughly $10–$15 per year for a
How much does it cost to host a website?
Hosting costs fall into two categories: hosting it yourself on a provider, or paying an agency/developer to host and maintain it for you. Typical ranges (as of November 2026):
| Setup | Typical monthly cost | What you pay for | Best for |
|---|---|---|---|
| Static site + custom domain | $0/mo + ~$10–$15/yr domain | Domain registration only; edge hosting and SSL are free | Portfolios, landing pages, docs, simple business sites |
| Shared web hosting | ~$3–$15/mo (note: renewal prices are often higher than intro promos) | Bundled PHP/MySQL server, cPanel, basic email | Small WordPress sites and low-traffic blogs |
| Managed WordPress / all-in-one builder | ~$15–$50/mo | Automatic updates, backups, security, drag-and-drop editor | Non-technical business owners who want fewer technical chores |
| Serverless full-stack (Cloudflare Workers / PaaS) | $0–$25/mo for early-stage apps (scales with usage) | Compute, database (D1/PostgreSQL), object storage (R2), queues | Indie SaaS, AI tools, paid portals and custom web apps |
| Having someone host and maintain your site | ~$50–$300+/mo | Hosting infrastructure plus a freelancer or agency handling updates, uptime monitoring, backups and small fixes | Businesses that want a dedicated person to call when something breaks |
When comparing hosting plans, always check the renewal rate (not just the first-year discount) and whether backups, SSL certificates and staging environments cost extra.
Tutorial 1: How to host a simple static website for free
If you have an HTML/CSS project or a static site built with Astro, Vite or Next.js static export, you can put it online in under 15 minutes:
- Put your code in a Git repository: Push your site folder to GitHub or GitLab.
- Connect it to a static host: Create a free account on Cloudflare Pages (or enable GitHub Pages in your repository settings) and select your repository.
- Set the build command and output directory: For plain HTML, leave the build command blank and point to the root folder; for a framework like Astro or Vite, set the build command (such as
npm run build) and output directory (dist). - Attach your custom domain: Add your domain in the host’s dashboard and point your DNS records (typically a
CNAMEor Cloudflare-managed DNS). Wait for automatic HTTPS/SSL provisioning to finish. - Verify redirects and mobile view: Confirm that
http://redirects tohttps://,wwwand apex domains resolve consistently to one canonical URL, and the site loads cleanly on a phone.
Tutorial 2: How to host a dynamic website with accounts, database and payments
Hosting gets significantly harder the moment your website stops being static. Once users need to sign in, buy credits or subscriptions, upload/download private files, or trigger background jobs, "where to host" is no longer just about serving HTML—you need five connected pieces working together:
- Application runtime: Serves SSR pages and API routes close to users.
- Database with migrations: Stores users, orders and ledgers safely with repeatable schema migrations.
- Public and private file storage: Serves public assets fast while protecting paid or private downloads behind server-side access checks.
- Background queues and scheduled jobs: Handles slow tasks, webhook recovery and retries without timing out a user request.
- Secret management and release checks: Keeps payment, mail and AI API keys out of your Git repository and checks builds before deployment.
A clean modern architecture for this is Cloudflare Workers + D1 (or PostgreSQL) + R2 + Queues + Cron, because everything runs under one Cloudflare account with predictable usage pricing and zero Linux server patching.
How a production Cloudflare Workers workflow looks (using SaaScaffold)
Disclosure: SaaScaffold is our own commercial source-code starter. If you only need a static site or a simple WordPress blog, you do not need SaaScaffold—use Tutorial 1 or a standard CMS host.
If you are building a paid online service, membership site or AI tool that you own and operate, wiring up authentication, webhooks, refunds, private R2 downloads and deployment scripts from scratch takes weeks. SaaScaffold ships that entire TypeScript stack (React + TanStack Start on Cloudflare Workers) ready to run in your own Cloudflare account:
- Develop locally with zero cloud bill: Before creating any cloud resources, you run the app, local Cloudflare D1 database, queue and cron jobs on your own machine:
pnpm install cp apps/web/.dev.vars.example apps/web/.dev.vars pnpm db:migrate pnpm dev - Choose your database: Run on Cloudflare D1 or PostgreSQL through the same Drizzle access layer.
- Configure bindings and secrets safely: Your domain, D1, R2 buckets (public and private) and queues are declared in site config (
site/wrangler.jsonc), while sensitive keys (payment, email, AI providers) stay strictly in Cloudflare Worker Secrets—never committed to Git. - Wire payments and background recovery: Stripe, PayPal, Waffo and Dodo Payments share one order flow and atomic credit ledger, with server-verified webhooks and test mode (
admin_test) before you open live payments. If your site runs AI tasks, built-in AI adapters connect to APIMart, fal.ai, Kie and SeeAPI with lease-based recovery for stalled jobs. - Deploy with runbooks and pre-launch checks: The repository includes 40 Markdown runbooks (
agents/) that Claude Code or Codex can follow to run tests, check domain redirects, preview the release plan and deploy throughpnpm release—pausing for your explicit approval before touching production.


License note: SaaScaffold’s standard commercial license covers unlimited websites that you own and operate. It does not cover hosting or building sites for agency clients without a separate extended license (see the software license).
Common website hosting mistakes to avoid
- Overpaying for a VPS you do not need: Managing Ubuntu security patches, Nginx configs and SSL renewals by hand adds ongoing maintenance risk when static hosting or Cloudflare Workers handles it automatically.
- Falling for teaser pricing without checking renewals: Many shared hosts advertise $2.99/mo for the first term and renew at 3×–5× that rate.
- Committing
.envor API keys to Git: Always keep payment and database credentials in your host’s encrypted secret store and keep local.env/.dev.varsfiles git-ignored. - Skipping canonical domain redirects: Leaving both
www.example.comandexample.com(orhttp://andhttps://) live without a single 301 redirect splits SEO signals and breaks auth cookies. - Confusing domain registrar with web host: You do not have to buy hosting from the same company where you registered your domain—pointing DNS from Cloudflare, Porkbun or Namecheap to a separate host takes two minutes and avoids vendor lock-in.
Next steps
- Launching a simple static portfolio, docs site or landing page? Follow Tutorial 1 above and host it free on Cloudflare Pages or GitHub Pages.
- Launching a dynamic site with accounts, subscriptions, private files or AI jobs in your own Cloudflare account? Read what is inside SaaScaffold, see how agent runbooks handle setup and deployment, or check SaaScaffold Early Access pricing.