Live Design Testing with GitHub Pages and a Custom Domain
In my previous post, I wrote about using Git branches to test blog designs before committing to them. A few of you asked a natural follow-up question: what if you want to run two experiments at the same time, each at its own live URL, without touching your main blog at all?
I had the same question! And it turns out [GitHub Pages][1] has a lovely little feature that makes this possible. The trick is not branches — it is repositories.
How GitHub Pages Handles Custom Domains
GitHub Pages custom domain routing is a hosting feature that maps every repository in an account to its own URL path under one shared custom domain, without any manual server configuration. When you link a custom domain to your GitHub Pages setup, it applies to your entire GitHub account, not just one repository. GitHub distinguishes between two types of Pages sites:
Your user site lives in a repository named exactly yourusername.github.io. A user site is where your main blog lives, and it publishes to the root of your custom domain — domain.com.
Any other repository in your account becomes a project site, and GitHub Pages automatically publishes it as a subdirectory of your custom domain. So a repository called test1 publishes to domain.com/test1, and a repository called test2 publishes to domain.com/test2. No extra configuration needed — it just works.
This dual-site model means you can have your main blog running happily at domain.com while two completely independent design experiments live at domain.com/test1 and domain.com/test2, all at the same time.
Subscribe to unlock the full article ❤️
I keep most of the site completely open. A few unusually detailed tutorials need a free subscriber login so I can keep publishing this kind of work.
Log in to unlock
The form below signs you up for the newsletter. It does not log you into the app — log in afterwards (same email) to unlock this article and download your subscriber gifts. New subscribers get an inbox mail: Set a password to unlock articles.
Full content temporarily unavailable — refresh in a moment