How to Host Your Portfolio for Free on GitHub Pages
Get a free yourusername.github.io portfolio URL right from your GitHub profile — you can upload files directly in your browser with zero terminal commands.
Before You Start
- Your edited html-css-js folder (make sure index.html is inside it)
- A free GitHub account (github.com)
| Template Version | Build Command | Output Directory |
|---|---|---|
| HTML / CSS / JS | None | / (root) |
Create a public repo named YOUR_USERNAME.github.io
Log in to github.com → '+' → 'New repository'. Name it EXACTLY <your-github-username>.github.io and make sure 'Public' is selected.
Upload your files right in the browser (no Git needed)
Click 'uploading an existing file' on your new repo page. Drag all files from INSIDE your html-css-js folder (so index.html sits directly at the top level, not inside a subfolder) and click 'Commit changes'.
Turn on GitHub Pages
Click the repo's 'Settings' tab → 'Pages' (left sidebar) → under Branch, select 'main' and '/ (root)' → click Save.
Open your live portfolio
Wait 1–2 minutes and visit https://YOUR_USERNAME.github.io. Pin this repo on your GitHub profile so recruiters see it right away.
Quick tips
- Seeing a 404 error? 99% of the time it means index.html is inside a nested folder instead of at the top level of the repo.
- Using React or Next.js instead of HTML? Use our Vercel guide — it is much easier than configuring GitHub Pages for React.
Other free hosting guides