Use custom domain for your github pages

If you have github pages username.github.io, you might want to use custom domain.
I’ll let you know how to use custom domain for your github pages.

  1. First, go to the setting pages for your username.github.io repository.

  2. Scroll down to bottom of the setting page, there is GitHub Pages section.

  3. There is Custom domain field, please enter your domain. - for example, www.yourdomain.com.

  4. Once you hit save button, there is a CNAME file automatically generated on your username.github.io repository.

  5. Change your Domain’s DNS record as below

    Type Name Value
    A @ 192.30.252.153
    A @ 192.30.252.154
    CName www username.github.io
  6. Once you change your domain dns record, you can access your Github pages with your custom domain.

  7. Regarding the https support for your custom domain, you have to wait 24 hours at least.

Share