Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Host multiple GitHub websites

I have three static web projects that I would like to host on my GitHub account.
I noticed in the documentation that you have to write your username for a repo name in order to tell GitHub that this will be a static web-site (ex. bluebird/bluebird.github.io).

Is it possible to host my projects with different name other than my username?

like image 481
birdybird03 Avatar asked May 29 '17 15:05

birdybird03


People also ask

How to host a website on GitHub?

Create a Github account. You need to have a Github account to host your website and access other awesome features. Go to GitHub's official website! and create a new account for free. 2. Create a new repository (folder). After you sign up!, click on create repository button on the left side of your screen.

Is it possible to have multiple GitHub Pages sites within one?

Yes, it is possible to have multiple GitHub Pages sites within one account. Create another GitHub repository and push your site files to the gh-pages branch. This would result in the site being hosted at tshepang.github.io/<repo-name>.

How to host multiple static content websites on one GitHub page?

With one github user account (https://< username >.github.io) we can still have multiple static content websites hosted with different custom domains (Eg: domain1.com, domain2.com, domain3.com)We can just create a new repository for each domain and point the A record to github pages IP and CNAME record to < username >.github.io

What is a project site on GitHub Pages?

These are called Project Sites because any project (repository) you create can have a website with this URL. If you want to use your own custom URL, you can purchase a domain name (I use Namecheap and pay about $10/year) and follow GitHub’s documentation on connecting your custom domain to your GitHub Pages website.


1 Answers

If you want three separate .github.io URLs, like this:

  • https://foo.github.io
  • https://bar.github.io
  • https://baz.github.io

...then you have no other choice but create one separate GitHub account for each site.
Obviously you can have only one http:/username.github.io URL per username :-)


But there's another solution: you can have one static page for each repository.
This is called Project Pages.

You can create three repositories, one per static site you want:

  • https://github.com/username/site1
  • https://github.com/username/site2
  • https://github.com/username/site3

Follow the instructions and you can have three static sites with URLs like this:

  • https://username.github.io/site1
  • https://username.github.io/site2
  • https://username.github.io/site3
like image 162
Christian Specht Avatar answered Nov 15 '22 07:11

Christian Specht