Make

How to Publish for Free with GitHub Pages

A file that lives only on your PC cannot be shared. GitHub Pages is a free shelf that turns it into a URL.

What is GitHub Pages?

GitHub Pages is a feature of GitHub (a cloud service for storing code) that lets you publish the HTML files in a repository (a folder) directly as a website. It's free for static sites with no ads. You get a URL like "username.github.io" and can also configure a custom domain. Engineers around the world use it to publish portfolios and documentation.

Overview of the publishing process

Time to publish (total ~30 minutes) Bar width proportional to each step's estimated time / ★ = difficulty (out of 5) / Assumes you have a PC ① Account ② Repository ③ File upload ④ Pages 5 min 7 min 15 min 3 min ★ ★ ★★★ ★★ 0 min 15 min 30 min github.com Email verify 2FA setup Name it username. github.io Upload index.html Commit Settings → Pages select main GitHub cat Octocat ※ After publishing, the URL (username.github.io) is accessible by anyone in the world ※ As of 2025: free, no ads. Bandwidth limit ~100GB/month
Fig 1: About 30 minutes total. The longest step is file preparation (writing the HTML).

① Create a GitHub account

Go to github.com and create a free account with your email and a password. Users must be 13 or older (under 13 requires parental consent). Your username becomes part of your public URL, so a nickname is recommended over your full real name.

② Create a repository

Click "New repository" to create a repository (like a folder). If you name it "username.github.io," you get a special URL (https://username.github.io/). Any other name also works, but the URL will be longer (https://username.github.io/repo-name/).

③ Upload index.html

From the repository, go to "Add file" → "Upload files," drag your index.html and CSS files in, and save (commit). If you know the command line, git push achieves the same thing.

④ Enable Pages

Go to Settings → Pages, select the source branch (usually "main"), and save. Wait 1–2 minutes, then visit the URL — your site should appear. At this point, anyone in the world can access it.

If the page doesn't show up, first check the filename of index.html, the repository name, and the source branch selected in Pages. GitHub Pages is case-sensitive, so Image.png and image.png are treated differently and images can fail to load. Updates can also take a moment to propagate after you push.

Before publishing real names, school names, addresses, or face photos, always talk to a parent/guardian or teacher. GitHub Pages is convenient for practice, but a published page can spread through search and social media. Starting with fictional profiles or portfolio work only is the safe approach.

What GitHub Pages can and can't do

GitHub Pages: Features and Limits (official docs estimates) Green bar = supported / Red bar = not supported / 2025 public info — check for latest Hosting cost Free (no ads) SSL (HTTPS) Automatic, free Custom domain Configurable (buy your own domain) Repository size 1 GB (recommended limit) Monthly bandwidth 100 GB/mo (soft limit) Build frequency 10 builds/hour max PHP / Node execution Not supported (static only) Database Not supported (use external APIs instead) Can do Can't do ※ For dynamic features, consider Vercel, Netlify, or Cloudflare Pages (all have free tiers too) ※ Using GitHub Pages with a Private repository requires a paid plan (GitHub Pro etc.)
Fig 2: Static sites: all OK. Server-side processing: all blocked. For practice projects, you'll easily stay within the limits.

Common pitfalls

3 things to watch out for with GitHub Pages
  • The repository must be "Public" to use Pages for free — which means your code is visible to everyone. Private repositories require a paid plan.
  • Never push passwords, API keys, or personal info in code. On a public repo, the whole world can read it.
  • Watch file name capitalization. A file that works on your PC may show 404 on GitHub because Image.png ≠ image.png.

How will this help you in the future?

Using GitHub is the "reading and writing" baseline of the software engineering world. The experience of publishing a site with GitHub Pages is also an introduction to Git and GitHub — directly useful for future team projects and job applications. "Your own GitHub account" is often looked at more than a resume in the engineering world.

Publishing work builds more than coding skills: writing clear descriptions, keeping a commit history, fixing broken links. When it's time to build a portfolio, showing both a live URL and the source repository lets anyone verify and inspect what you built.

What you can do today

Today: make one URL
  1. Check GitHub’s age rules with a parent
  2. Put index.html in a repository
  3. Turn on Pages and write down the URL

Summary

GitHub Pages is the go-to free service for publishing static HTML/CSS/JavaScript sites. From account creation to live URL, it takes about 30 minutes once you know the steps. Yes, server-side code isn't supported — but for a portfolio, blog, or club site, it's the ideal publishing platform. "I published something to the real internet" is an experience that changes how fast you learn from that point on.

Check GitHub Pages is for?