How to Publish a Website for Free: A Beginner’s Guide to GitHub Pages

Learn how to publish your website for free using GitHub Pages. No server, no domain, no cost—just upload your HTML file and get a public URL.

Contents

“ I made a web page… but how do I show it to other people? ” “ I want a link I can open on my phone! ” If that sounds like you, the easiest solution is GitHub Pages.

With no server contract, no domain purchase, and no fees, you can publish your website to the world for completely free.

What is GitHub Pages?

GitHub Pages is a free hosting service for static websites.

It’s the perfect tool for beginners learning web development.

1P1A-EN

Publishing Your Website Takes Only 4 Steps

① Create a GitHub Account

It’s free and requires only an email address.

② Create a Repository (a folder for your site)

  1. Log in to GitHub
  2. Click the “+” icon → New repository
  3. Name your repository (example: myweb)
  4. Select Public
  5. Click Create repository

This becomes the place where your web files will live.

③ Upload Your index.html

  1. Open your new repository
  2. Click Add file → Upload files
  3. Drag & drop your index.html file
  4. Click Commit changes

Your website is now ready for publishing.

④ Enable GitHub Pages

  1. Go to your repository’s Settings
  2. Select Pages from the left menu
  3. Set “Branch” to main / root
  4. Click Save

After a short wait, GitHub will generate your public URL.

Example:

Text
https://username.github.io/myweb/

Open this URL on your phone—and your website is live!

Accessible on Any Device, Anywhere

With GitHub Pages, you can:

It’s easily one of the most valuable free tools for beginners.

If Your Page Doesn’t Appear, Check These:

These simple checks fix 90% of issues.

1P1A_EN

Summary

Publishing a website is not difficult— in fact, once you learn it, it becomes a powerful free skill you can use forever.

OJappTools-en

How to View Your Web Page on Your Phone — The Easiest Ways for Beginners

A simple beginner-friendly guide on how to view a web page you created on your phone. No server needed. Learn the easiest free methods: online hosting, local Wi-Fi preview, and file transfer.

Ojach

Hi, I'm a solo web developer based in Japan.I'm the creator of One Page. One App. (1P1A), a page-first approach to Progressive Web Apps. I build WordPress plugins and web tools that make it easy to turn individual web pages into installable home screen apps.Most articles on this site are first written in Japanese and then translated into English. While the English may not always be perfect, every article is based on extensive real-device testing with iPhone, Android, Safari, Chrome, Web App Manifest, Service Workers, and modern PWA architecture.

← Back to articles