Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub pages defaulting to a randomly generated name instead of <whatever>.github.io

Tags:

github-pages

I'm working in a repo I created under an organizational GitHub

When I publish the repo via GitHub pages the URL defaults to a randomly generated string, such as

http(s)://windy-waterfalls-e5r23og9.pages.github.io/

I'd like it to default to http(s)://<username>.github.io/<repository> or http(s)://<organization>.github.io/<repository> so that the URL is explanatory of the repo, and so I don't have to pay/manage my own domain

Is there a way to do this?

like image 622
testore Avatar asked Aug 05 '26 00:08

testore


1 Answers

This occurs when the gh pages visibility is set to private

According to About subdomains for privately published sites

Privately published sites are available at a different subdomain than publicly published sites. This ensures that your GitHub Pages site is secure from the moment it's published.

We use a unique subdomain for the privately published site to ensure that other repositories in your organization cannot publish content on the same origin as the site

According to Organization-level custom domain not working for internal repository pages #23350

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

Workarounds

  1. If the info isn't sensitive, you can go to Settings > Set the Visibility to Public
  2. You can still set a custom domain to avoid having a long set of garbled characters in your URL
like image 72
vs-coder Avatar answered Aug 09 '26 17:08

vs-coder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!