5

I have a GitHub account called example and created a Gitpage called example.github.io .

Now I want to have a subdomain name with the example.github.io called sub.example.github.io that can access to example.github.io/sub.

I've searched a lot on the internet but almost every of them are about "how to use subdomain names with gitpage and custom domain", but I want to know how to create the subdomain names with default gitpage domain name like example.github.io and not with the custom domain.

I even tried to change the CNAME file (depends on some blog on the internet) but it never works.

Notice: this question is not smilar with this one, this question about how to use subdomain name with Gitpage and custom domain name.

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Danhui Xu
  • 69
  • 10

1 Answers1

2

github prohibits to use such subdomains:

 You cannot use custom domains ending with github.io, github.com, github.net, github.page, or githubusercontent.com.

So you can use either example.github.io/sub, or your own custom domain

Artem Aliev
  • 1,362
  • 7
  • 12
  • Thanks for reply! So how can i do that? just edit the `custom domain name` to `example.github.io/sub` like this? – Danhui Xu Jan 27 '23 at 13:24
  • you get it by default. just create repository with name "sub" in 'your-organization', go to Seting->pages, save. and you got 'your-organization.github.io/sub works. https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site – Artem Aliev Jan 30 '23 at 09:03