๐ŸŒ Hosting Guide

How to Host a Website for Free in 2026 โ€” GitHub Pages vs Netlify vs Vercel

You built a portfolio or project โ€” now put it online with a real URL, for โ‚น0. This guide compares the four best free hosting platforms and walks through the exact deployment steps for each, including connecting a custom domain.

Quick Comparison โ€” Which One Should You Use?

FeatureGitHub PagesNetlifyVercelRender
Static sites (HTML/CSS/JS)โœ“โœ“โœ“โœ“
React/Vue build supportManualโœ“ Autoโœ“ Autoโœ“ Auto
Node.js backendโœ—Functions onlyFunctions onlyโœ“ Full server
Custom domainโœ“ Freeโœ“ Freeโœ“ Freeโœ“ Free
Free HTTPS (SSL)โœ“โœ“โœ“โœ“
Bandwidth (free tier)100 GB/mo soft100 GB/mo100 GB/mo100 GB/mo
Deploy methodGit pushGit / drag-dropGit / CLIGit
Best forPortfolio, docsBeginners, static + formsReact/Next.js appsFull-stack Node apps
TL;DR: Plain HTML/CSS/JS portfolio โ†’ GitHub Pages (simplest, and recruiters see your GitHub). React app โ†’ Vercel. Node.js + Express backend โ†’ Render. Want drag-and-drop with zero Git knowledge โ†’ Netlify.

Option 1 โ€” GitHub Pages (Best for Portfolios)

๐Ÿ™ GitHub Pages Recommended for students

Free static hosting directly from a GitHub repository. Bonus: every recruiter checks your GitHub โ€” hosting your portfolio there puts your code and your site in one place.

Steps to deploy:

  1. Create a GitHub account and a new repository named yourusername.github.io (this exact name gives you the root URL).
  2. Push your website files (index.html must be at the repo root):
git init
git add .
git commit -m "My portfolio website"
git branch -M main
git remote add origin https://github.com/yourusername/yourusername.github.io.git
git push -u origin main
  1. Go to repo Settings โ†’ Pages โ†’ Source: Deploy from a branch โ†’ select main.
  2. Wait ~1 minute. Your site is live at https://yourusername.github.io ๐ŸŽ‰

Limitations: static files only โ€” no PHP, no databases, no server code.

Option 2 โ€” Netlify (Easiest for Beginners)

๐ŸŸข Netlify Zero Git required

The famous "drag and drop" deploy โ€” you can put a site online in under 60 seconds without knowing Git.

Steps to deploy (drag-and-drop):

  1. Sign up free at netlify.com (use your GitHub account).
  2. Go to the Sites tab โ†’ drag your project folder onto the drop zone.
  3. Done. You get a URL like random-name-12345.netlify.app โ€” rename it in Site settings.

Steps for auto-deploy from GitHub (better): "Add new site โ†’ Import an existing project โ†’ GitHub โ†’ pick repo." Every git push now redeploys automatically.

Extras on the free tier: form handling (contact forms without a backend!), redirects, deploy previews.

Option 3 โ€” Vercel (Best for React / Next.js)

โ–ฒ Vercel

Made by the creators of Next.js. If your project is React, Vite, or Next.js, Vercel detects your framework and configures the build automatically.

Steps to deploy:

  1. Push your React project to GitHub.
  2. Sign up at vercel.com with GitHub โ†’ Add New โ†’ Project โ†’ import your repo.
  3. Vercel auto-detects the framework (e.g., Vite โ†’ npm run build, output dist). Click Deploy.
  4. Live in ~40 seconds at your-project.vercel.app. Every push to main auto-deploys; every PR gets its own preview URL.

Option 4 โ€” Render (For Node.js Backends)

๐Ÿ”ง Render

The other three host static files (plus serverless functions). Render runs a real server โ€” your Express app, APIs, WebSockets โ€” free.

Steps to deploy a Node/Express app:

  1. Ensure your app reads the port from the environment:
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => console.log(`Server running on ${PORT}`));
  1. Push to GitHub โ†’ sign up at render.com โ†’ New โ†’ Web Service โ†’ connect the repo.
  2. Build command: npm install ยท Start command: node index.js โ†’ Create.

Free tier catch: the service sleeps after 15 minutes of inactivity โ€” the first request after sleep takes ~30 seconds. Fine for portfolio demos; mention it in your README.

Connecting a Custom Domain (Optional but Professional)

A domain like yourname.dev costs โ‚น200โ€“800/year (Namecheap, GoDaddy, Hostinger, Cloudflare Registrar) and makes your portfolio look far more professional on a resume.

  1. Buy the domain from any registrar.
  2. In your hosting platform (Pages/Netlify/Vercel/Render), add the custom domain in settings.
  3. At your registrar, add the DNS records the platform shows you โ€” usually a CNAME record pointing www to the platform, and an A record for the root domain.
  4. Wait 10 minutesโ€“24 hours for DNS to propagate. HTTPS is issued automatically on all four platforms.
Student tip: the GitHub Student Developer Pack (free with your college email) includes a free .me domain from Namecheap for one year, plus credits on many hosting platforms.

Common Deployment Mistakes

FAQ

Is free hosting really free forever?
Yes โ€” GitHub Pages, Netlify, Vercel and Render free tiers have no time limit. They're free because the companies sell paid tiers to businesses. For student portfolios and projects, the free tier is more than enough.
Can I host a PHP website free on these platforms?
No โ€” none of these four run PHP. For PHP you need a traditional host (InfinityFree is a free option, or paid shared hosting like Hostinger from ~โ‚น79/month).
Which is best for my resume/portfolio?
GitHub Pages โ€” recruiters click your GitHub anyway, and seeing a pinned repo that is also a live site is a strong signal. Add the live URL to your resume header.
Will free hosting handle real traffic?
100 GB/month bandwidth serves roughly 100,000+ visits for a typical portfolio page. You will not hit the limit as a student.

Next Steps