Search code examples
subdomaingithub-pagescname

GitHub Pages: custom CNAME on a Directory


Is it possible to set a CNAME to a directory of a github-pages site? For example:

Without CNAME username.github.io/blog/index.html

And with CNAME blog.mydomain.com/index.html

I didn't find anything on the help page, so please help me.


Solution

  • You cannot set a CNAME in the blog folder of username.github.io repository.

    But you can set a CNAME (blog.mydomain.com) at the root of a username.github.io/blog repository.