Mary Knize

Custom Domains with GitHub Pages and Namecheap

1 min read


How to set up custom domains on GitHub Pages after buying a domain from Namecheap.

On GitHub:

  • Click the "Settings" button at the top of the repo page.
  • Scroll down to "GitHub Pages".
  • Choose "master branch" from the "Source" dropdown. (Or "master branch /docs folder" if you're fancy. I should be fancy.)
  • Add the custom domain to the "Custom domain" box and click the "Save" button.

On Namecheap:

  • In the Domain List, click the "Manage" button for the domain you added to GitHub pages.
  • Click "Advanced DNS" at the top of the page.
  • Change the CNAME Record to "". If you're not me, replace this with whatever your username is Also, I'm not sure if you have to have the period at the end of the CNAME, but it's always worked for me. Note that you can't make any other changes to the DNS settings until the CNAME has been changed.
  • Now, delete any other records hanging out in there.
  • Click "Add New Record". Select "A Record". The Host should be "@". The IP Address should be
  • Now do that again with the IP Address

Now sit back, be patient, and wait for everything to populate. Within 24 hours everything should be working correctly.

Canonical URL