Skip to content

Setting Up GitHub Pages with Custom Subdomains

Published:

Today I learned how to set up GitHub Pages with a custom subdomain, which I used for my SpeakEasy documentation site.

This builds on the basic GitHub Pages setup - make sure you have that working first!

The Goal

Host a GitHub Pages site at speakeasy.arach.dev instead of the default username.github.io/repo-name URL.

Step-by-Step Setup

1. Configure GitHub Pages

In your repository:

2. Add Custom Domain

3. Configure DNS Records

In your domain’s DNS settings (I use Cloudflare), add a CNAME record:

Type: CNAME
Name: speakeasy
Target: arach.github.io
Proxy: DNS only (gray cloud)

4. Wait for DNS Propagation

5. Enable HTTPS

Key Gotchas

Result

Your site is now live at https://speakeasy.arach.dev with automatic HTTPS! 🎉

This setup is perfect for documentation sites, project demos, or any static content you want on a branded subdomain.