Create multiple websites with multiple domains in one repo? #22779
-
Hello, simple question. Is it possible to have multiple different websites with multiple different domains in one GitHub repository? If I have to put them in different folders or branches, that’s okay. In fact, multiple branches would be ideal for keeping things organized. Thanks for reading. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi @SirNapkin1334, welcome to the GitHub Support Community! GitHub Pages only supports a single custom domain per repository. For your case I’d instead recommend creating separate repositories to host your different sites—if the content is going to be completely different across both. That way you can keep the source code for both sites separate and allow you to attach your custom domains to each independently. Once you’ve uploaded your site’s content you can enable Pages from the repository settings and then add your custom domain. |
Beta Was this translation helpful? Give feedback.
-
For me, the site content is the same, I see no sense in creating duplicate repos for the same thing, are you sure there is no alternatives? |
Beta Was this translation helpful? Give feedback.
-
Thank you for reminding me that this exists so I can close it as no longer necessary. I wish you luck, friend. |
Beta Was this translation helpful? Give feedback.
-
i have a portfolio in different repo with website |
Beta Was this translation helpful? Give feedback.
Hi @SirNapkin1334, welcome to the GitHub Support Community!
GitHub Pages only supports a single custom domain per repository. For your case I’d instead recommend creating separate repositories to host your different sites—if the content is going to be completely different across both. That way you can keep the source code for both sites separate and allow you to attach your custom domains to each independently.
Once you’ve uploaded your site’s content you can enable Pages from the repository settings and then add your custom domain.