Tevpro insights
How to Deploy a Website for Free
Choose a free website host that fits your site, deploy a static example, and check the costs and limits before you call it live.
Key takeaways
- Check what your site needs to run before choosing a host. Static files can use a free Pages service; a server or database needs its own plan.
- GitHub Pages suits a simple static site. Cloudflare Pages and Netlify are useful when you want builds from Git and preview deployments.
- Build locally, publish the right output folder, then test the public URL, assets, routes, and deployed commit.
- Free hosting does not include every cost. Check domain registration, external services, usage limits, and the provider’s terms for your use.
To deploy a website for free, first identify what the site needs to run. A plain HTML/CSS/JavaScript site can go live on GitHub Pages, Cloudflare Pages, or Netlify without renting a server. A built frontend can use the same path after its build creates static files. If the site needs a server, database, private credentials, or scheduled jobs, a free static host by itself is not a complete deployment plan.
For a first static site, choose GitHub Pages if the code is already on GitHub and you want the fewest moving parts. Choose Cloudflare Pages or Netlify if you want builds from Git and preview deployments. A provider subdomain can keep the hosting and URL cost at zero; a custom domain, external API, email service, or usage beyond plan limits can add cost.
Before you deploy: identify the output
- Plain HTML: look for index.html plus CSS, images, and JavaScript. There may be no build command.
- React, Vue, Astro, or another built frontend: run the project build and find its output directory. For a typical Vite project this is dist, but check your actual configuration.
- If your app needs a server or API, check for server routes, authentication, writes, and database access. Static files alone cannot execute these operations. Choose a platform and plan that support the required runtime, then test its limits.
Never put private API keys into browser JavaScript or committed repository files. Variables included in the frontend build are visible to visitors and are not secret. If a feature needs a secret, keep it in a backend function or backend with access controls.
Choose a free deployment path
GitHub Pages: simple static publishing
Best for a portfolio, documentation, or a small static site kept in a GitHub repository. On GitHub Free, Pages is available for public repositories. The default address for a project site is username.github.io/repository, so asset paths need to work under that subpath. GitHub Pages does not run your own backend code.
For detailed instructions on publishing from a branch or GitHub Actions, see our GitHub Pages publishing walkthrough. This guide focuses instead on deciding among free hosts and verifying the complete deployment.
Cloudflare Pages for static sites built from Git
Best when you want a build from Git, automatic deployments from a production branch, and preview URLs for other branches. In Cloudflare, go to Workers & Pages, create a Pages application, connect GitHub or GitLab, select the repository, set the build command and output directory, then deploy. For plain static files, leave the build command blank; for a Vite frontend, verify the build command and dist output against your project. Check the deployment log before opening the generated pages.dev URL.
Cloudflare Pages limits builds, file counts, and asset sizes on its free plan. Pages Functions use Workers quota; adding a backend does not make its usage unlimited. Verify current limits against the provider documentation before committing a production workload.
Netlify: repository import and deploy previews
Best for a frontend whose build settings you can confirm in one place. In the Netlify dashboard choose Add new project, import a Git repository, authorize your provider, confirm the build command and publish directory, then publish. Check whether the new site is public: Netlify notes that new teams with a default private setting may create a private project until you change visibility. Test the generated URL and production branch after the first build.
Vercel and the limits of the Hobby plan
Vercel can be convenient for a framework application, but do not assume a free plan covers a business production site. Review the current Hobby terms, usage caps, and rules for commercial use first. If the app uses server rendering, functions, or other runtime features, estimate those separately rather than treating it as a static deployment. This article does not recommend Hobby as a blanket free hosting solution for a business.
Walkthrough: deploy a small static site for $0 hosting
1. Prepare a site that works locally
Create an index.html at the project root and preview it locally. This minimal page works without a framework:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My first deployed site</title>
</head>
<body>
<main><h1>It works</h1><p>My site is live.</p></main>
</body>
</html>
Open the file in a browser to catch basic markup problems. For a framework project, run its build locally too, and verify the generated index.html and assets in the output folder.
2. Put the files in a repository
Create an empty repository in GitHub and copy its HTTPS URL. From your project folder, run the following after Git is installed and your GitHub authentication works:
git init
git add .
git commit -m "Add first website"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git push -u origin main
Do not commit .env files, API tokens, or other secrets. If the project already has Git history or a remote, use its existing repository instead of reinitializing it.
3. Turn on publishing
For the simplest path, open the repository Settings > Pages. Under Build and deployment, choose Deploy from a branch, select main and /(root), and save. GitHub publishes the static files, then shows the site URL in Pages settings. Use the GitHub Actions publishing option instead if your project needs a build step; the existing Tevpro walkthrough explains that choice between publishing from a branch and using GitHub Actions in detail.
Alternatively, import this repository into Cloudflare Pages or Netlify. Leave build command empty for the plain HTML example and select the directory containing index.html as the output. For a built frontend, enter its actual build command and output folder, then inspect the build logs before opening the host URL.
4. Verify the public result, not just a green build
- Open the production URL in a private browser window and confirm index.html renders.
- Refresh a nested route, click links, and load images and scripts. A blank screen often means a wrong asset base path or output directory.
- Check the deployment log and the exact commit that went live. Push a small edit and confirm the production URL changes.
- If you connect a custom domain, configure its DNS and HTTPS according to that provider, then verify both the provider URL and domain. A free hosting tier does not make domain registration free.
What “free” does not include
You can deploy without paying for hosting, but other parts of the site may still cost money. Domain registration, email sending, managed databases, paid APIs, excess usage, team permissions, and restrictions on commercial use are separate decisions. Avoid publishing a login or payment flow until you have checked secrets, access rules, backups, operational monitoring, and the provider’s terms for your use case.
If the project moves beyond static hosting into a business application, see Tevpro’s mobile and web app development service if you need help building and running the application. A static host cannot replace a backend.
Which route should you choose?
For a basic HTML portfolio, publish from a branch on GitHub Pages. For a static frontend that needs automatic builds and previews, use Cloudflare Pages or Netlify after checking the build output and current plan terms. For an app with runtime logic, choose the platform around its server, data, and security requirements first. A hosting price of zero is not a substitute for an architecture decision.
Sources
- [1] GitHub, What is GitHub Pages?docs.github.com
- [2] GitHub Pages quickstartdocs.github.com
- [3] Cloudflare Pages Git integrationdevelopers.cloudflare.com
- [4] Cloudflare Pages limitsdevelopers.cloudflare.com
- [5] Netlify, deploy from your repositorydocs.netlify.com
- [6] Vercel Hobby planvercel.com
- [7] Vercel fair use policyvercel.com
Why work with us
Why Tevpro?
Whether you’re a startup with a bold product idea or an established company seeking a stronger delivery partner, Tevpro delivers results. Our expert consultants specialize in building secure, scalable applications that simplify operations and drive real ROI.
FAQ
Free website deployment questions
Yes. GitHub Pages, Cloudflare Pages, and Netlify provide platform URLs. A custom domain is optional and usually requires separate registration.


