Elena' s AI Blog

Live Design Testing with GitHub Pages and a Custom Domain

20 Feb 2026 (updated: 24 Aug 2026) / 10 minutes to read

Elena Daehnhardt


Generated by Midjourney. Prompt: AI-assisted coding with a robot reviewing a pull request.

If you click an affiliate link and subsequently make a purchase, I will earn a small commission at no additional cost (you pay nothing extra). This is important for promoting tools I like and supporting my blogging.

I thoroughly check the affiliated products' functionality and use them myself to ensure high-quality content for my readers. Thank you very much for motivating me to write.



TL;DR:
  • Create separate GitHub repositories for each design experiment. GitHub Pages automatically publishes project repositories as subdirectories of your custom domain — so yourusername/test1 becomes domain.com/test1. When you are done, copy what you love into main and delete the test repositories.

Previous: Part 31 — Testing Blog Designs with Git Branches and GitHub Pages

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.

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.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.

Citation
Elena Daehnhardt. (2026) 'Live Design Testing with GitHub Pages and a Custom Domain', daehnhardt.com, 20 February 2026. Available at: https://daehnhardt.com/blog/2026/02/20/live-design-testing-with-github-pages-and-a-custom-domain/
All Posts