How to Upload an HTML Website to the Internet (Free and Paid Ways)

Updated:

You’ve built a website with HTML, CSS and maybe some JavaScript, and it works when you open index.html on your computer. Now you want a real web address that anyone can open. This guide shows four ways to do it, from a 30-second free option to proper paid hosting with your own domain.

Before you upload: a 2-minute checklist

Most “my site works on my laptop but not online” problems come from one of these:

  • The home page must be called index.html (all lowercase) and sit in the top folder of your site. Servers open index.html automatically when someone visits your address.
  • Use relative paths. Write images/logo.png or css/style.css, not C:\Users\Ravi\Desktop\site\images\logo.png. A path to your own computer will never work online.
  • Match upper and lower case exactly. Windows ignores case, but most web servers don’t: Logo.PNG and logo.png are different files online.
  • Keep everything in one folder, with subfolders such as css, js and images inside it.
  • Shrink big images first. A 5 MB photo makes the page slow. Our free image compressor can reduce it in your browser.

A typical site folder looks like this:

my-site/
├── index.html
├── about.html
├── css/
│   └── style.css
├── js/
│   └── script.js
└── images/
    └── logo.png

Which method should you use?

MethodCostYour addressBest for
Netlify DropFreeyourname.netlify.appThe fastest way to get online
GitHub PagesFreeusername.github.ioStudents and developers who use GitHub
CloudflareFreeyourname.pages.devFast global delivery
Paid hosting (File Manager or FTP)PaidYour own domain, e.g. yourshop.comBusiness sites, email, PHP

All three free options can use your own domain later, too.

Method 1: Netlify Drop (fastest, free)

  1. Open app.netlify.com/drop.
  2. Drag your whole site folder (the one that contains index.html) onto the drop area.
  3. Wait a few seconds. Netlify shows a live address ending in .netlify.app.
  4. Create a free Netlify account and claim the site, so it stays online. Sites deployed without an account are temporary.

To update the site later: open the site in your Netlify dashboard, go to Deploys, and drag the updated folder onto the drop area there. The new version replaces the old one.

Method 2: GitHub Pages (free, great for a portfolio)

  1. Sign in to GitHub and create a new repository named exactly username.github.io, replacing username with your GitHub username. Make it public.
  2. In the new repository, choose Add file › Upload files, drag in everything inside your site folder (so index.html is at the top level of the repository, not inside a subfolder), and click Commit changes.
  3. Open Settings › Pages. Under Build and deployment, set Source to Deploy from a branch, choose the main branch and the / (root) folder, and click Save.
  4. Wait a few minutes, then open https://username.github.io. GitHub says changes can take up to 10 minutes to appear.

You can host other projects too: a repository called portfolio with Pages turned on appears at https://username.github.io/portfolio/.

GitHub Pages is free for public repositories. It’s for static sites: HTML, CSS, JavaScript and images, not PHP or a database.

Method 3: Cloudflare (free, fast worldwide)

Cloudflare has two ways to upload a ready-made site without any code tools:

  • Cloudflare Drop: open cloudflare.com/drop and drag in your folder or a ZIP of it. You get a temporary live preview for one hour; sign in to claim it and keep it.
  • Pages Direct Upload: in the Cloudflare dashboard, create a Pages project with Direct Upload, give it a name, then drag in your folder or ZIP. The site gets an address ending in .pages.dev. Upload a new folder to the same project to update it.

Method 4: Paid hosting (your own domain)

If you’ve bought hosting from a company such as Hostinger, Bluehost or GoDaddy, the files go into a folder on the server called public_html (on some hosts it’s htdocs or www). Whatever is inside public_html is what visitors see at your domain.

Option A: File Manager (no software needed)

  1. Put your site folder into a ZIP file. On Windows, right-click the folder and choose Compress to ZIP file; on a Mac, right-click and choose Compress.
  2. Log in to your hosting control panel (cPanel, hPanel or similar) and open File Manager.
  3. Open the public_html folder for your domain. Delete the host’s placeholder page (often default.php or index.php) if there is one.
  4. Upload the ZIP and Extract it inside public_html.
  5. Make sure index.html sits directly inside public_html. If it ended up in public_html/my-site/, move the files up one level.
  6. Open your domain in the browser.

Option B: FileZilla (FTP or SFTP)

FTP is better when you upload often or have many files.

  1. Download the free FileZilla Client from the official site, filezilla-project.org, and install it. Avoid download mirrors that bundle extra software.
  2. In your hosting panel, find your FTP account details: host (often ftp.yourdomain.com or an IP address), username, password and port.
  3. In FileZilla, type them into the Quickconnect bar at the top and click Quickconnect. Use port 21 for FTP, or 22 for SFTP if your host supports it (SFTP is encrypted, so prefer it).
  4. The left side shows your computer and the right side shows the server. On the right, open public_html.
  5. On the left, open your site folder, select everything inside it, and drag it to the right.
  6. When the transfer queue at the bottom is empty, open your domain.
FileZilla connected to a hosting server: Quickconnect bar at the top, local files on the left, server files on the right
FileZilla after a successful Quickconnect: your computer on the left, the server on the right. (Screenshot from our original tutorial.)

Using your own domain

If you bought a domain separately (for example from a domain registrar) and host the site on Netlify, GitHub Pages or Cloudflare, add the domain in that service’s settings. It will show you the DNS records to add at your registrar. DNS changes usually work within minutes but can take longer to reach everyone. All of these services, and most paid hosts, give you a free HTTPS certificate, so your site opens with the padlock.

Problems and fixes

What you seeLikely causeFix
“404 Not Found” or a list of filesNo index.html at the top levelRename your home page to index.html and move it out of any subfolder
The page loads but has no stylingWrong path to the CSS file, or a case mismatchCheck the href in your <link> tag matches the real file name exactly
Images are brokenPath points to your own computer, or the case is wrongUse relative paths like images/photo.jpg
Old version still showingThe browser cachePress Ctrl+F5 (Cmd+Shift+R on Mac), or open the page in a private window
GitHub Pages shows the README insteadindex.html isn’t in the root of the repositoryMove it to the top level, or pick the right folder in Settings › Pages

FAQ

Can I upload an HTML website for free?

Yes. Netlify Drop, GitHub Pages and Cloudflare all host static HTML, CSS and JavaScript sites for free, with a free address and HTTPS. You only pay if you want your own domain name or a paid plan.

Do I need a domain name?

No. The free services give you an address such as yourname.netlify.app. Buy a domain when you want a short, professional address like yourshop.com.

Can I run PHP or a database on these free hosts?

No. Netlify Drop, GitHub Pages and Cloudflare serve static files. For PHP and MySQL you need regular web hosting (Method 4).

How do I update my website after uploading?

Upload the changed files again the same way: drag the new folder onto Netlify or Cloudflare, upload the changed files to your GitHub repository, or replace them in public_html.

Need a professional site instead? Techpass Master builds business websites and online stores.

WhatsApp us📞 Call now