← Garden of Thoughts

From HTML to Live: Deploying a Business Website with GitHub Pages and a Custom Domain

June 8, 2026 github-pages dns git web consulting favicon google-search-console

A single index.html file. A custom domain. A consulting business that needed a professional web presence without the overhead of a CMS. Here is how the whole thing came together in one session — from a local file to a live, HTTPS-secured site indexed by Google.

Protecting the Work First

Before a single commit was made, two things were put in place: a .gitignore and a LICENSE file.

The .gitignore was written to ignore everything by default, then explicitly un-ignore only index.html and LICENSE. This is a deliberate inversion of the usual approach — instead of listing what to exclude, you list only what should ever be committed. For a landing page with a large assets/ folder, it prevents accidental publishing of images, fonts, or source files that have no business being in a public repo.

The LICENSE file was a conscious choice, not an afterthought. A repository without a license is technically "all rights reserved" under copyright law — but most people don't know that. An explicit proprietary license file makes the intent unambiguous and gives cleaner grounds for enforcement if content is ever copied without permission. The footer of index.html was updated to match: © 2026 [The Company]. All Rights Reserved.

Git, GitHub, and the First Push

With no existing git history, the repo was initialized from scratch, a remote was added pointing to GitHub, and only index.html and LICENSE were staged. The commit was clean and intentional. The push created the repo's first branch: main.

GitHub Pages was then enabled from the repository settings, serving directly from the root of main. Within minutes the site was live at the default github.io URL.

DNS: Pointing a Real Domain at GitHub

The domain was registered and managed through WordPress.com. The existing DNS had an A record handled by WordPress and a CNAME pointing www back to the bare domain — neither of which pointed anywhere near GitHub.

Two A records were added pointing to GitHub Pages' IP addresses, and the www CNAME was updated to point to the GitHub Pages hostname. GitHub created a CNAME file in the repo automatically when the custom domain was saved in Pages settings. After a short propagation wait, the DNS check turned green.

HTTPS came next. GitHub issued a certificate automatically via Let's Encrypt. Once the certificate was ready, Enforce HTTPS was enabled — all http:// traffic now redirects to https:// without any server configuration.

Favicon and Search Console

The browser tab was still showing the WordPress favicon from cache. A favicon.svg already existed in the assets/ folder — it just needed a <link rel="icon"> tag in the <head> and an update to .gitignore to allow the assets/favicon.svg file through. One commit, one push.

Google Search Console was set up to replace a cached search result that still showed the old WordPress content. Ownership was verified via a DNS TXT record, and a manual indexing request was submitted. Google will re-crawl the new content within days.

What This Stack Gets You

GitHub Pages with a custom domain is a remarkably clean setup for a static business site: no server to maintain, no CMS to update, free HTTPS, and a git-based deployment workflow. The entire publishing pipeline is a git push.


Related Reading


Edited and refined with assistance from Claude Code.