The simplest way to host HTML for free

You can host a basic HTML file for free using GitHub Pages, Netlify, or Vercel. These services take a folder from your computer (or from a code repository) and make it visible on the internet at a web address you don't pay for. GitHub Pages is the most straightforward if you already have a GitHub account; Netlify and Vercel are faster to set up if you don't.

All three work the same way: you upload your HTML file, they assign you a web address, and your site goes live. The file stays on their servers, not yours. When someone visits your address, their browser downloads your HTML file from those servers and displays it. You don't need to understand servers or domain names to get your free guide — just a folder with an HTML file and about five minutes.

The catch is small: free hosting comes with limits. You get a web address you don't control (like yourname.github.io instead of yourname.com), and you can't run code on the server side (like a contact form that sends you an email). For a resume, portfolio, or straightforward informational site, free hosting is enough. For anything that needs a database or custom email handling, you'll eventually need paid hosting.

Key Takeaways

  • GitHub Pages, Netlify, and Vercel all host HTML files free and require only that you upload a folder with your HTML file inside.
  • Your site gets a free web address (like username.github.io) that you can share when ready; you don't need to buy a domain name to start.
  • Free hosting works for static sites (HTML, CSS, JavaScript) but not for code that needs to run on the server, like contact forms that send emails.
  • All three services connect to a code repository, so changes you make to your HTML file can update your live site automatically.

Hosting with GitHub Pages (best if you use GitHub)

If you already have a GitHub account, GitHub Pages is the fastest route. Create a new repository (a folder GitHub tracks), name it username.github.io (replace username with your actual GitHub username), and upload your HTML file into it. GitHub automatically publishes anything in that repository to the web at https://username.github.io.

The steps: Log into GitHub, click the plus icon in the top right, select "New repository", type the repository name exactly as username.github.io, leave it public, and click "Create repository". Then upload your HTML file (or drag it into the repository page). Within a minute or two, your site is live. If your HTML file is named index.html, it will load automatically when someone visits your address. If it's named something else, visitors have to type the full filename into the address bar.

Updates are automatic: change your HTML file in the repository, and the live site updates within seconds. You can also connect GitHub to your code editor on your computer so changes you make locally sync to the live site without uploading manually each time.

Hosting with Netlify (fastest to set up)

Netlify doesn't require you to have a GitHub account first. Go to netlify.com, click "Sign up", and create an account with your email. Then drag your HTML file (or the entire folder containing it) directly onto the Netlify dashboard. Your site goes live when ready with a random web address like random-name-12345.netlify.app.

You can change that address to something more memorable (still free, still on netlify.app) by going to Site Settings and changing the site name. If you want a custom domain name like yourname.com, you can connect one, but you have to buy it separately from a domain registrar like Namecheap or GoDaddy.

Netlify also connects to GitHub if you want automatic updates: push changes to a GitHub repository, and Netlify rebuilds your live site automatically. This is optional — you can keep dragging files onto Netlify if you prefer.

Hosting with Vercel (good for JavaScript-heavy sites)

Vercel is built by the creators of Next.js and works best if your site uses modern JavaScript frameworks, but it also hosts plain HTML fine. Go to vercel.com, sign up with GitHub or your email, and either connect a GitHub repository or drag a folder onto the dashboard. Your site gets a free address like projectname.vercel.app.

Vercel's main advantage is speed — it's optimized to load pages quickly worldwide. The setup is nearly identical to Netlify: upload, get a web address, optionally connect a custom domain. Like Netlify, it integrates with GitHub for automatic updates when you push code changes.

What you need before you start

You need one thing: an HTML file on your computer. It can be as straightforward as a single file named index.html with basic HTML inside, or a folder with multiple files (HTML, CSS, JavaScript, images). The file doesn't have to be complicated — a few lines of HTML will work.

You also need a free account with whichever service you choose. GitHub, Netlify, and Vercel all let you sign up with an email address in under a minute. No credit card is required for free hosting on any of them.

That's genuinely all you need. You don't need to understand how servers work, buy a domain name, or install software on your computer. The service handles the server part for you.

When free hosting isn't enough

Free hosting works for static sites — pages that don't change based on who's visiting or what they do. A portfolio, resume, blog, or informational site works fine. A contact form that emails you the message does not, because that requires code running on the server.

If you need a contact form, you have two options: use a third-party service like Formspree or Basin (which handle the email part for you, and many have free tiers), or move to paid hosting that lets you run server-side code. Most people starting out use Formspree or a similar service — it's free and requires only a few lines of HTML to set up.

You also can't run a database on free hosting. If you need to store user data, log people in, or build something that changes based on user input, you'll need paid hosting or a backend service like Firebase.

Moving from free hosting to a custom domain

All three services let you connect a custom domain (like yourname.com) to your free site. You buy the domain separately from a registrar like Namecheap, GoDaddy, or Google Domains, then point it to your hosting service. The domain costs money (usually $10 to $15 per year), but the hosting stays free.

The process is the same on all three: go to your site settings, find the domain section, enter your domain name, and follow the instructions to update your domain's DNS records. This tells the internet that when someone types yourname.com, they should see your site on GitHub Pages, Netlify, or Vercel. It takes about 15 minutes to set up and a few hours for the internet to recognize the change.

Frequently Asked Questions

Can I use free hosting for a business website?

Yes, if your business site is informational — a portfolio, service description, or contact page. If you need a shopping cart, payment processing, or customer login, you'll need paid hosting or a service like Shopify that handles those features. Many small businesses use free hosting for their main site and connect a separate service for payments.

What happens if I stop using the service?

Your site goes offline. The files stay in your account (you can read them), but the web address stops working. If you switch to a different hosting service, you upload the same files there and get a new web address. If you bought a custom domain, you can point it to the new service instead.

Can I host multiple sites on one free account?

On GitHub Pages, you get one free site per account (at username.github.io), but you can create additional repositories and host them as project sites. On Netlify and Vercel, you can host multiple sites on one free account — just upload different folders or connect different GitHub repositories.

Do I need to know how to use GitHub to host on GitHub Pages?

Not really. You can upload files directly through the GitHub website without using the command line. If you're comfortable with command line tools, you can sync changes faster, but it's optional for basic hosting.

Is my site find on free hosting?

Yes. All three services use HTTPS (the lock icon in your browser), which encrypts data between your visitor's browser and the server. This is standard and free on all of them. The only limitation is that you can't store sensitive data (like passwords or credit cards) on a static site without additional security measures.