How to Publish Your Website Online for Free
After building your first website with HTML and CSS, the next step is publishing it so other people can see it on the internet.
In this guide, you will learn how to publish your website completely free using modern developer platforms.
By the end of this tutorial, you will know how to:
- Upload your website to GitHub
- Deploy your site using GitHub Pages
- Deploy using Netlify
- Deploy using Vercel
Publishing your website online is called deployment. It means making your website accessible on the internet.
What You Need Before Publishing
Before publishing your website, make sure you have:
- Your website project folder
- A GitHub account
- Internet connection
- Visual Studio Code
If you haven’t created a website yet, read:
How to Create Your First Website Using HTML and CSS
Method 1: Publish Using GitHub Pages
GitHub Pages is one of the easiest ways to host a static website.
Step 1: Create a GitHub Account
Go to:
https://github.com
Create a free account if you do not already have one.
Step 2: Create a New Repository
After logging in:
- Click New Repository
- Name your repository
Example: my-first-website
- Select Public
- Click Create Repository
Step 3: Upload Your Website Files
Inside the repository:
- Click Add file
- Select Upload files
- Upload your project files:
Example: index.html style.css images/
- Click Commit changes
Make sure your homepage file is named index.html. GitHub Pages looks for this file automatically.
Step 4: Enable GitHub Pages
Now enable hosting.
-
Go to Settings
-
Click Pages
-
Under Source, choose: Deploy from branch
-
Select: main
-
Click Save
GitHub will generate your website URL.
Example: https://yourusername.github.io/my-first-website
Your website is now live.
Method 2: Publish Using Netlify
Netlify is another popular platform for hosting websites.
Step 1: Go to Netlify
Open:
https://netlify.com
Create a free account.
Step 2: Deploy Your Site
After logging in:
- Click Add new site
- Select:
Deploy manually
Step 3: Drag and Drop Your Website Folder
Simply drag your website folder into the Netlify upload area.
Netlify will automatically:
- Upload your files
- Deploy your site
- Generate a public URL
Example: https://cool-site-123.netlify.app
Your website is now online.
Method 3: Publish Using Vercel
Vercel is a modern hosting platform used by many developers.
It works especially well for Next.js projects, but it also supports static websites.
Step 1: Go to Vercel
Open:
https://vercel.com
Sign up using your GitHub account.
Step 2: Import Your Project
After logging in:
- Click Add New Project
- Select your GitHub repository
- Click:
Deploy
Vercel will automatically deploy your website.
Example URL: https://my-first-website.vercel.app
Which Free Hosting Platform Should You Use?
Here is a quick comparison:
| Platform | Best For | Difficulty | |--------|--------|--------| | GitHub Pages | Beginners | Very Easy | | Netlify | Static websites | Easy | | Vercel | Modern frameworks | Easy |
For beginners, GitHub Pages is usually the best place to start.
Tips for Publishing Websites
Here are some important tips when publishing websites:
Always include an index.html file
Your website must contain:
index.html
This acts as the homepage.
Organize your project
Example project structure:
my-website │ ├── index.html ├── style.css ├── script.js └── images/
Good structure makes projects easier to maintain.
Test your site before publishing
Always test your website using Live Server before deploying it online.
What You Learned
In this guide you learned how to:
- Publish a website online
- Use GitHub Pages
- Deploy using Netlify
- Deploy using Vercel
- Host websites completely free
These platforms are widely used by professional developers around the world.
Next Steps
Now that your website is online, you can improve it by learning:
- CSS layouts
- JavaScript interactivity
- Responsive design
- Version control with Git
Publishing small projects regularly is one of the fastest ways to become a professional developer.
Next Article on EdhuvaTech
Next we will cover:
10 HTML Tags Every Beginner Must Know
This will help you write better and more structured HTML code.