Organization-level custom domain not working for internal repository pages

Hello there!

I’ve read the GitHub Pages custom domain docs and they state:

After you configure a custom domain for a user or organization site, the custom domain will replace the <user> or <organization> portion of the URL for any project sites owned by the account that do not have a custom domain configured. For example, if the custom domain for your user site is , and you have a project site with no custom domain configured that is published from a repository called octo-project , the GitHub Pages site for that repository will be available at .

I have configured an organization-level custom domain by creating a repository with the name organization and by enabling pages and a custom domain for that.

Based on the documentation above I was expecting that from now on all pages that do not specify another custom domain would be found under but that is not the case. Instead, I get 404 " The site configured at this address does not contain the requested file. "
What am I missing? Is there any way to enable a custom (sub)domain for an entire organization such that all pages would automatically use that domain as explained in the docs?

Repository-specific custom domains work as intended, but setting up a new one for each repository is not a feasible solution. Redirection from also works but that too is not an acceptable solution since it redirects to the default (unusable) domain name that all private pages have (unless a repository-specific custom domain is set).

Hello and welcome here!

The behavior you are describing works as intended but only for public Pages sites.

For security reasons, private Pages sites (the ones with a random default hostname that enforce authentication + authorization on access) need to be isolated.

Thanks for the clarification! If I may suggest, think it would be useful to have a specific section in the docs where the limitations of private/internal pages are explained :slight_smile:

1 Like