Search code examples
githubdnssubdomaingithub-pages

How to configure DNS to point to github project pages?


I have a domain name with name.com and my project's github pages is

my_username.github.io/project's name/  

and I read this from their docs

CNAME does not resolve to URLs - i.e http://name.com/support - because it cannot handle special characters like : and /

so I am stuck here. Because I haven't seen many using A record, I wonder if it can be used with github pages. Thanks.


Solution

  • The DNS domain configuration is normally reserved for User & Organization pages, not for Project Pages.

    For project page, you need to:

    • create a CNAME entry point to my_username.github.io. (note the final '.'!).
    • add a CNAME file to your project root in the gh-pages branch (with name.com as its content).

    See: