GitHub Pages Subfolder
Hi,
I have a GitHub Pages site, let's call it ikaris.github.io
I also have subfolders inside, like ikaris.github.io/site1 and ikaris.gituub.io/site2
I'd like to point two different domains to site1 and site2, masked so the user sees the URL and not the GitHub subfolder.
The sites will basically be static html / CSS.
I'd also like to have HTTPS / SSL support on these two sites.
I have looked into Namecheap and Porkbun and they cannot do this.
However I heard that CloudFlare can do this.
Can anyone tell me if this can be done?
Thank you!
4 Replies
Using Github Pages Custom Domains, you could add the two domains as Custom Domains and then use Transform Rules rewrite url to dynamically append
/site1
or /site2
to all requests
Or you could just use Cloudflare Pages rather then Github Pages with its mono-repo feature, create two Cloudflare Pages projects off the same repo, one for each site, with different output directory setting. There's a limit of I believe 10 Pages Projects per github repo thuogh, so wouldn't infinitely scaleThank you for the answer! Bottom line is, you're saying it's possible to do this and still have HTTPS / SSL certification?
And sorry for the cross-post @Erisa, I realized after I posted it that the #pages-help channel might be a better place. Thank you!
Yea, Github Custom Domains will issue you a certificate for the Cloudflare -> Origin side, and then Cloudflare will issue you a certificate for User -> Cloudflare side. Or if you went with Cloudflare Pages, Cloudflare would issue you a certificate that way too
OK I will figure this out and ask if I have any questions. Thank you!