Use GitHub assigned domain instead of custom domain? #152653
-
Select Topic AreaGeneral BodyHi |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hello @zt64 If you have a custom domain set up for your main GitHub Pages site, any additional repositories you publish using GitHub Pages by default will also attempt to use that custom domain. Unfortunately, GitHub does not provide a direct toggle to disable this behavior for specific repositories. However, you can force a repository to use the default GitHub Pages URL instead. Solution: Remove the Custom Domain from the Secondary RepositoryTo make your second repository use the default
After doing this, the second repository should default to the GitHub-assigned subdomain: Alternative: Use a Subdomain for the Custom DomainIf your goal is to use your custom domain only for your main repository but keep a subdomain (or no domain) for others, you can:
Why This HappensGitHub Pages automatically applies a user/organization-level domain to all repositories unless manually removed from individual repositories. Right now, there isn’t an explicit setting to allow mixed domain usage across different repositories. |
Beta Was this translation helpful? Give feedback.
-
|
In my case, the custom domain is not listed, so there's no way for me to remove the custom domain. But when I run GitHub pages publishing workflows, they try to publish to the custom domain anyways. |
Beta Was this translation helpful? Give feedback.

Hello @zt64
If you have a custom domain set up for your main GitHub Pages site, any additional repositories you publish using GitHub Pages by default will also attempt to use that custom domain. Unfortunately, GitHub does not provide a direct toggle to disable this behavior for specific repositories. However, you can force a repository to use the default GitHub Pages URL instead.
Solution: Remove the Custom Domain from the Secondary Repository
To make your second repository use the default
github.io/repo-name/format instead of your custom domain: