The simplest ways to put your HTML file online at no cost

You can host an HTML file for free using services like GitHub Pages, Netlify, or Vercel — each takes your file from your computer and makes it visible on the web with a public URL. GitHub Pages works directly from a GitHub repository and is built into the platform. Netlify and Vercel both let you drag and drop a folder or connect to a code repository, and they handle the server work for you. All three are genuinely free for static HTML, CSS, and JavaScript files, with no hidden charges or time limits.

The trade-off is that you get a subdomain you do not control — something like yourname.github.io or yourproject.netlify.app — rather than your own domain name. If you want a custom domain, you can buy one separately and point it to any of these services, usually for $10 to $15 per year.

Key Takeaways

  • GitHub Pages, Netlify, and Vercel all host static HTML files for free and require no credit card or payment information.
  • GitHub Pages works best if your files are already in a GitHub repository; Netlify and Vercel are faster if you just want to upload a folder.
  • Free hosting comes with a subdomain like yourname.netlify.app, not a custom domain — you can add a custom domain later by buying one separately.
  • These services work only for static files (HTML, CSS, JavaScript); if you need a database or server-side code, you will need a different hosting option.
  • Your site goes live within minutes of uploading, and you can update it by re-uploading your files or pushing changes to your repository.

GitHub Pages: Free hosting built into GitHub

If your HTML files are already in a GitHub repository, GitHub Pages is the fastest route. You turn it on in your repository settings, point it to the branch where your files live (usually main), and GitHub builds your site automatically. Your URL becomes yourusername.github.io/repository-name, or just yourusername.github.io if the repository is named yourusername.github.io.

The process takes three steps: create or use an existing repository, push your HTML files to it, and enable Pages in the repository settings under the "Pages" tab on the left sidebar. GitHub then deploys your site within a few minutes. Every time you push new changes to that branch, your live site updates automatically.

GitHub Pages works best for people who already use Git and GitHub for version control. If you do not use GitHub yet, the setup involves learning Git basics, which adds friction. For a one-off HTML file with no version control, Netlify or Vercel are simpler.

Netlify: Drag-and-drop hosting with no Git required

Netlify lets you upload a folder of HTML files without touching the command line or Git. Go to netlify.com, sign up with your email or GitHub account, and click "Add new site" then "Deploy manually." Drag your folder into the box, and Netlify uploads it and assigns you a URL like random-name.netlify.app within seconds.

To update your site later, you can drag a new folder over the same project, and Netlify replaces the old files. If you want automatic updates, you can connect a GitHub repository instead, and Netlify will redeploy every time you push changes — but this is optional.

Netlify also offers a free custom domain feature: you can buy a domain through any registrar and point it to your Netlify site by changing DNS records. The free tier includes unlimited bandwidth and sites, so you can host multiple projects at once.

Vercel: Hosting optimized for speed

Vercel works similarly to Netlify but is built by the creators of Next.js and optimized for fast page loads. Sign up at vercel.com, click "Add New Project," and either upload a folder or connect a GitHub repository. Vercel assigns you a URL like yourproject.vercel.app and deploys within seconds.

Vercel's free tier is genuinely unlimited for static sites — no bandwidth caps, no project limits. Like Netlify, you can add a custom domain by pointing DNS records from a domain registrar to Vercel's servers.

The main difference from Netlify is that Vercel is slightly more developer-focused and includes built-in support for serverless functions if you later want to add backend code. For a plain HTML site, both services work identically well.

What these services do and do not support

All three services host static files — HTML, CSS, JavaScript that runs in the browser, images, and fonts. They do not support databases, server-side code (like PHP or Python), or file uploads from your site visitors. If your HTML file is a standalone project with no backend, any of these will work.

If you later need a database or backend code, you will need to move to a different host. Services like Heroku (now paid), Railway, or traditional shared hosting providers support server-side languages. But for a resume, portfolio, documentation site, or any project that is just HTML and client-side JavaScript, the free options here are sufficient.

Choosing between the three based on your workflow

Use GitHub Pages if you already push code to GitHub and want one less service to manage. The setup is free and automatic, but you need to know Git.

Use Netlify if you want the simplest drag-and-drop experience and do not use Git. It is the most beginner-friendly option and has the best free tier for custom domains.

Use Vercel if you want the fastest performance and might add serverless functions later. It is also drag-and-drop simple and equally free.

All three are genuinely free with no time limit, no credit card required, and no surprise charges. The only cost is if you buy a custom domain name, which is optional and costs the same regardless of which host you choose.

Updating your site after it goes live

Once your site is live, updating it depends on how you deployed it. If you used drag-and-drop on Netlify or Vercel, download your files, edit them locally, and drag the folder back into the same project. Netlify and Vercel will replace the old files and redeploy within seconds.

If you used GitHub Pages or connected a GitHub repository to Netlify or Vercel, edit your files locally, commit them to Git, and push to your repository. The hosting service automatically detects the change and redeploys your site within a minute or two.

You can also edit files directly in the GitHub web interface if you only need to change one or two files — no need to use the command line. This makes small updates fast even if you are not comfortable with Git.

Adding a custom domain name

All three services let you use a custom domain (like yourname.com) instead of their subdomain. First, buy a domain from a registrar like Namecheap, GoDaddy, or Google Domains — this costs $10 to $15 per year. Then, in your hosting service's settings, add the domain and follow the instructions to update your DNS records at the registrar.

The DNS update usually takes a few minutes to a few hours to take effect. Once it does, your site is live at your custom domain. The hosting itself remains free; you only pay for the domain name.

Frequently Asked Questions

Can I host a site with a database or backend code for free?

No, these three services host only static files. If you need a database or server-side code, you will need a different host like Railway, Render, or traditional shared hosting. Some of those offer free tiers, but they are more complex to set up than drag-and-drop hosting.

Will my site stay live forever if I do not pay?

Yes. GitHub Pages, Netlify, and Vercel all offer genuinely free hosting with no time limit and no automatic charges. Your site stays live as long as you want it to, even if you never pay for anything. The only cost is a custom domain if you choose to buy one.

What happens if my site gets a lot of traffic?

All three services handle high traffic on the free tier. GitHub Pages and Netlify have no bandwidth limits. Vercel also has no bandwidth limits for static sites. You will not be charged or throttled if your site becomes popular.

Can I host multiple sites on one account?

Yes. Netlify and Vercel let you host unlimited sites on the free tier. GitHub Pages gives you one free site per username (yourusername.github.io) plus unlimited project sites (yourusername.github.io/project-name). You can have as many as you want.

Do I need to know how to code to use these services?

No. If your HTML file is already written, you just need to upload it. Netlify and Vercel have drag-and-drop interfaces that require no coding knowledge. GitHub Pages requires basic Git knowledge, but the other two do not.