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 openindex.htmlautomatically when someone visits your address. - Use relative paths. Write
images/logo.pngorcss/style.css, notC:\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.PNGandlogo.pngare different files online. - Keep everything in one folder, with subfolders such as
css,jsandimagesinside 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.pngWhich method should you use?
| Method | Cost | Your address | Best for |
|---|---|---|---|
| Netlify Drop | Free | yourname.netlify.app | The fastest way to get online |
| GitHub Pages | Free | username.github.io | Students and developers who use GitHub |
| Cloudflare | Free | yourname.pages.dev | Fast global delivery |
| Paid hosting (File Manager or FTP) | Paid | Your own domain, e.g. yourshop.com | Business sites, email, PHP |
All three free options can use your own domain later, too.
Method 1: Netlify Drop (fastest, free)
- Open app.netlify.com/drop.
- Drag your whole site folder (the one that contains
index.html) onto the drop area. - Wait a few seconds. Netlify shows a live address ending in
.netlify.app. - 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)
- Sign in to GitHub and create a new repository named exactly
username.github.io, replacingusernamewith your GitHub username. Make it public. - In the new repository, choose Add file › Upload files, drag in everything inside your site folder (so
index.htmlis at the top level of the repository, not inside a subfolder), and click Commit changes. - Open Settings › Pages. Under Build and deployment, set Source to Deploy from a branch, choose the
mainbranch and the/ (root)folder, and click Save. - 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)
- 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.
- Log in to your hosting control panel (cPanel, hPanel or similar) and open File Manager.
- Open the
public_htmlfolder for your domain. Delete the host’s placeholder page (oftendefault.phporindex.php) if there is one. - Upload the ZIP and Extract it inside
public_html. - Make sure
index.htmlsits directly insidepublic_html. If it ended up inpublic_html/my-site/, move the files up one level. - Open your domain in the browser.
Option B: FileZilla (FTP or SFTP)
FTP is better when you upload often or have many files.
- Download the free FileZilla Client from the official site, filezilla-project.org, and install it. Avoid download mirrors that bundle extra software.
- In your hosting panel, find your FTP account details: host (often
ftp.yourdomain.comor an IP address), username, password and port. - 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).
- The left side shows your computer and the right side shows the server. On the right, open
public_html. - On the left, open your site folder, select everything inside it, and drag it to the right.
- When the transfer queue at the bottom is empty, open your domain.

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 see | Likely cause | Fix |
|---|---|---|
| “404 Not Found” or a list of files | No index.html at the top level | Rename your home page to index.html and move it out of any subfolder |
| The page loads but has no styling | Wrong path to the CSS file, or a case mismatch | Check the href in your <link> tag matches the real file name exactly |
| Images are broken | Path points to your own computer, or the case is wrong | Use relative paths like images/photo.jpg |
| Old version still showing | The browser cache | Press Ctrl+F5 (Cmd+Shift+R on Mac), or open the page in a private window |
| GitHub Pages shows the README instead | index.html isn’t in the root of the repository | Move 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.
Keep reading



