How to point domain to site hosted on github pages?

I have created a website and placed it on github in the repo with First when I went to that website, my website displayed correctly. Then I bought a domain, lets say I placed a CNAME file in the repo, so now forwards to

I understand that I have to point my domain at the github server in order to allow my website to be displayed at, but I’m not sure how. I created the site through I tried editing the zone file to have a CNAME entry with but that didn’t work. I also tried to edit the DNS server name but no entry I placed in there seemed valid.

  • Custom domain for GitHub project pages
  • Docker container unable to clone from
  • Why is my Github-hosted site responding with HTTP 302 instead of 200?
  • How can I push/pull between git repositories when both are behind firewalls/NATs/…?
  • XCode4 couldn't resolve local server
  • TSVN DNS error: The requested name is valid, but no data of the requested type was found
  • Any help would be greatly appreciated. Thanks.

  • GitHub small binary files
  • Prevent EOL normalization for CSV files
  • Unable to push changes to remote repository with multiple users
  • how to get git log from a repo. in
  • How to view Github user content?
  • Is it possible to get a list of merges into a branch from the Github website OR API?
  • 2 Solutions collect form web for “How to point domain to site hosted on github pages?”

    As you understood, the CNAME file on the github side must be completed by a custom DNS setting on the registrar side, in order to complete the matching between your domain name ( and the subdomain on github. The CNAME file is required by github to route incoming request on its own DNS Zone ( to the proper user subdomain.

    Therefore, the missing step is having your domain actually pointing to github’s DNS Zone. On the registrar side (, you achieve that by editing the DNS Zone file attached to your domain. This zone file describes the hierarchical domain name structure of the DNS Zone that your very domain pertains to. What you are about to do is changing the mapping between some parts of your DNS Zone and IPs. When you want to point a top-level-based domain name to an arbitrary IP v4 (here, github’s DNS Zone located at, you are interested in redefining an A Record (A simply standing for “Address”) in your own zone.

    A specific answer for

    Here you can see the list of settings for your zone file. A new feature of Gandi is that of “versions”: different versions of the zone file can be created and only one is active at a time.

    To tweak the zone file for github, first click on “Create a new version”. It will simply create a copy of the currently activated version.

    The preferred way for wiring is to add a new CNAME mapping, from *.{yourdomain.tld} to {youraccount} For instance, my domain must be the facade for, so I added a CNAME mapping * to (the final dot is mandatory in gandi’s config).

    You may want to edit the * and @ record types settings as well, for instance if you just want the whole DNS zone to behave like a “proxy” (meaning it will “redirect” to your github subdomain no matter what). This is not required though, so this step is optional. I assume you are still in Normal edit mode. Click on the Pen icon on the right side of the * line. Keep all fields untouched but the “Value” one: paste the github URI in (the github documentation recommends using; you may have found different values on the internet, though: don’t use them). Validate, then proceed the same for the @ line.

    Do not forget to click on “Activate this version” when you’re ready. Check that the “Active version number” is correct. The changes will take some time to propagate.

    Detailled examples and procedure:

    You need to setup an A record which points to the github server. You said you used, so basically you would change your DNS settings for the top level domain by adding(or modifying) an A record to point to github.

    If you want, you can add a subdomain (like www.) by adding a CNAME in your DNS to point to the top level domain or an A record which, again, points to github.

    Git Baby is a git and github fan, let's start git clone.