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.
How to Run a GitHub Pages Design Test on a Custom-Domain Subdirectory
🔒 Subscribe to keep reading.
Merging a Winning GitHub Pages Design Back into Main
🔒 Subscribe to keep reading.
Deleting GitHub Pages Test Repositories After a Design Decision
🔒 Subscribe to keep reading.
GitHub Pages Subdirectory Testing: Key Facts and Limitations
🔒 Subscribe to keep reading.
GitHub Pages Subdirectory Testing: Key Takeaways
🔒 Subscribe to keep reading.
You've hit a Deep Dive tutorial.
I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):
Full content temporarily unavailable — refresh in a moment
Already a subscriber? Use the magic link from your last newsletter, or reset your password.
Log in to unlock
New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.