Can You Build and Run a Full Website for $0?
Almost. Hosting, serverless API code, a database, key value storage, email forwarding, analytics and Search Console can all run on free tiers, and a small site can stay inside them for years. The one cost you should not skip is a domain, which runs roughly $10 to $12 a year for a .com at an at-cost registrar.
A question that keeps coming up from people starting side projects: can you run a real site, with a backend, login, an API and a custom domain, without paying for a single subscription? Not a static HTML page, a working app. The short version is yes for everything except the domain, as long as you pick a stack whose free limits are generous and you know exactly where those limits are. This guide uses Cloudflare as the example because its free plan covers hosting, code, storage and DNS in one account, which keeps the number of tools (and bills) down.
What the free stack looks like
Here is a full stack where every piece has a free tier that a new site will not outgrow for a long time:
- Frontend hosting: Cloudflare Pages. Static files are served from the edge, with automatic HTTPS and deploys from a GitHub repo.
- Backend and API: Cloudflare Workers, or Pages Functions, which are Workers that live in a
functions/folder inside your Pages project. - Database: D1, Cloudflare's SQLite database, queried from your Worker.
- Sessions, cache and small settings: Workers KV.
- Source code and CI: a free GitHub repository.
- DNS and SSL: included with any domain added to a free Cloudflare account.
- Email on your domain: Cloudflare Email Routing forwards hello@yourdomain to an inbox you already have.
- Analytics and search: Google Analytics 4, Google Search Console and Bing Webmaster Tools are all free.
Nothing in that list asks for a card to get started. The only line item left is the domain itself.
The free limits, in numbers
Free is only useful if you know where it stops. These are the figures from Cloudflare's own limits and pricing pages as of November 2026:
- Pages: 500 builds per month, 1 build at a time, up to 20,000 files per site, 25 MiB maximum per file, and up to 100 custom domains per project. Bandwidth for static assets is not metered on the free plan.
- Workers: 100,000 requests per day and 10 milliseconds of CPU time per invocation. Static asset requests on Pages do not count against this, only requests that run your code.
- KV: 100,000 reads per day, 1,000 writes per day, 1 GB of storage.
- D1: 5 million rows read per day, 100,000 rows written per day, 5 GB of total storage.
To put that in context: a site doing 3,000 visits a day, where each visit triggers two API calls, uses about 6,000 Worker requests. That is 6% of the daily allowance. Most new sites will not get near these ceilings in their first year.
Where free actually bites
The limits that catch people are not the headline request counts. They are these four:
- KV writes. 1,000 per day is small. If you store every login session or every page view counter in KV, a few hundred active users can use it up. Put sessions and counters in D1 instead, where the write budget is 100,000 rows a day, and keep KV for things that are read often and written rarely.
- D1 is now enforced. Since September 1, 2026, D1 queries on the Workers Free plan return errors once your account passes the daily row read or row write limit, until the counter resets at midnight UTC. Your stored data is safe, but your app stops answering. The usual cause is a query without an index that scans a whole table on every request, so a table of 50,000 rows read 100 times costs 5 million rows. Add indexes on the columns you filter by and check the rows read figure in the D1 dashboard.
- CPU time. 10 ms per request is plenty for reading a database and returning JSON. It is not enough for heavy work like resizing images or hashing passwords with a slow algorithm on every request. Do expensive work once and cache the result.
- Builds. 500 a month sounds like a lot until a bot or a script commits every few minutes. Batch your changes.
Authentication without a subscription
Login is where most people assume they need a paid service. You have two free routes. The first is to sign users in with a provider they already have, such as Google or GitHub, using OAuth from your Worker. You register the app in the provider's developer console at no cost and store a session ID in a cookie, with the session row in D1. The second is a magic link: the user enters an email, your Worker creates a one time token in D1 and emails a link. Sending email is the one part Cloudflare's free plan does not cover for outbound messages, so you would use a transactional email provider's free tier for that. Several offer a free monthly allowance that is enough for a small site's login emails.
Either way, keep the session table small and indexed on the session ID, and you will use a few rows per request.
Set it up today
With Node installed, the whole backend can be created from a terminal. Create the database:
npx wrangler d1 create my-site-dbWrangler prints a binding block with a database_id. Paste it into wrangler.toml, then add your tables from a SQL file:
npx wrangler d1 execute my-site-db --remote --file=./schema.sqlDeploy the built frontend and any functions/ folder to Pages:
npx wrangler pages deploy dist --project-name my-siteYour site is now live at my-site.pages.dev at no cost. To attach your own domain, go to Workers and Pages, select the project, then Custom domains, then Set up a custom domain. If the domain uses Cloudflare DNS the records are created for you.
Why the domain is worth paying for
You can run on a free pages.dev subdomain forever, and for a portfolio or a tool for friends that is fine. If the goal is search traffic and income, pay for the domain. Three reasons:
- Ownership. Rankings and backlinks build up on the hostname. If you ever move hosts, a domain you own moves with you. A platform subdomain does not.
- AdSense. AdSense asks you to add your site at the root domain you control. Plan on a real domain before you apply.
- Search Console. A domain property, verified with one DNS TXT record, covers every subdomain and protocol in one report.
Cloudflare Registrar sells domains at the registry's cost with no markup, so a .com is roughly $10 to $12 a year, and renewals cost the same as the first year. Avoid registrars that advertise $1 first years and then renew at $20 or more.
So the honest total for a full stack site is about $1 a month, the price of the domain. Once it is live, run it through the free site checker to confirm HTTPS, redirects, robots.txt and the sitemap are all set before you ask Google to index it.
Where this question came from
- r/webdev: is it possible to build and run a website for $0
- Cloudflare changelog: D1 free tier limit enforcement
- Cloudflare Pages limits
Questions about running a site on free tiers
Do I need a credit card to use Cloudflare's free plan?
No. Pages, Workers Free, D1, KV, DNS and Email Routing can all be used on a free account without adding a payment method. You only add one if you move to Workers Paid.
What happens when my site goes over the D1 free limit?
Since September 1, 2026, D1 queries return an error until the daily counter resets at midnight UTC. Your data is not deleted. Indexing the columns you filter on is usually enough to stay well under the limit.
Can a free pages.dev site get AdSense approval?
Plan on using a domain you own. AdSense asks you to add the site at its root domain, and a domain also keeps your rankings portable if you ever change hosts.
Is Workers Free enough for a site with real traffic?
For most new sites, yes. 100,000 code requests per day covers thousands of daily visitors, and static files on Pages do not count toward that number.