Create a public GitHub repository, upload index.html and your other files with Add file → Upload files, then open Settings → Pages, choose Deploy from a branch, select main and / (root), and save. About a minute later the site is live at https://username.github.io/repository/. It is free and permanent, but public and indexed — for a quick private share, an instant link is faster.
Step by step (no command line)
- Sign in to GitHub (or create a free account).
- Click New repository. Give it a short lowercase name — it becomes part of the URL — and keep it Public. GitHub Pages on private repositories requires a paid plan.
- On the empty repository page choose uploading an existing file, drag in the contents of your site folder (so
index.htmlsits at the top), and commit. - Go to Settings → Pages. Under Build and deployment, set Source to Deploy from a branch, pick
mainand/ (root), and save. - Wait a minute and refresh the Pages settings. The live URL appears at the top.
Name the repository username.github.io and the site is served at the root, https://username.github.io/, instead of a sub-folder.
Why the page loads without CSS or images
A normal (project) Pages site lives in a sub-folder: /repository/. So a root-absolute path such as /css/style.css points at username.github.io/css/style.css — outside your site — and 404s. Use relative paths (css/style.css). The other classic causes are case mismatches (GitHub Pages is case-sensitive) and files left out of the upload; the ZIP site checker catches all three before you commit.
Folders starting with an underscore
By default Pages runs your files through Jekyll, which ignores files and folders beginning with _ (common in exported sites, e.g. _next/ or _assets/). Add an empty file named .nojekyll to the top of the repository to serve everything as-is.
Limits worth knowing
- Published sites should stay under about 1 GB, with a soft bandwidth limit of about 100 GB per month.
- Static files only — no server-side code.
- Sites are public and normally indexed by search engines.
- Changes go live after a short build, usually under a minute.
Check GitHub's own Pages documentation for the current limits.
GitHub Pages or an instant link?
Choose GitHub Pages for a portfolio, documentation or project site you want to keep for years, under version control, possibly with your own domain. Choose an instant link when you want someone to see a page now, privately, without accounts — and especially for client drafts (password), classroom activities (QR code) or AI-generated pages you will tweak a few times. The full comparison is in HTML hosting compared.