I have read several questions about custom domains pointing to a github-pages website. However, I could not find the answer for my case.
I have an apex domain (e.g.
http://example.com
) pointing to an S3 bucket.I have a
www
redirection to this apex domain.I have an existing organization project website on github pages that I can access using an url like this:
http://ORGANIZATION.github.io/blog
I want to access that github-page hosted website using a subdomain, like blog.example.com
while keeping my apex set to my S3 bucket.
Most of the answers I found were to redirect the domain apex to http://ORGANIZATION.github.io/
and access to the blog using "www.example.com/blog". It is not what I want.
Since ORGANIZATION.github.io/blog.
is not a valid CNAME record, I can no use it as value for my sub domain CNAME record.
Is there a way to use a github pages organization project website with a custom subdomain?
.htaccess
file thus removing the need to do anything with the git side of things – user3788685