I have repository on GitHub with GitHub Pages set up. If I go to myusername.github.io/my-repo
everything works correctly. But, I would like to have my own domain name that looks better than that one.
I purchased a domain name: mydomain.site
. I created a CNAME record that points www
to myusername.github.io
. But if I now go to www.mydomain.site/my-repo
, I get GitHub's 404 screen. The same happens if I go to just www.mydomain.site
.
Ideally, I would like users to go to www.mydomain.site
and see the content from myusername.github.io/my-repo
, but it would also be acceptable if they had to go to www.mydomain.site/my-repo
. I don't want to simply redirect them, my domain name must remain in the address bar. How do I achieve this?
(myusername, my-repo and mydomain are obviously not the real names that I used, I need to keep them private)