Custom domain for your website

1 minute read


You may think that is not cool enough compared with No worries, we can change the domain.

NOte: the following steps could also be found on official documentation

  1. Buy your prefered domain. I bought it from namecheap. I strongly recommend you to also buy the SSL which can make your website more safe by starting with https instead of http. Some browsers will alear unsafe if your website starts with http.
  2. After you bought your domain, you can go to the setting of you repository, click Code and automation-> Pages -> Custom domain -> enter -> Save.
  3. Set DNS. Go to your domain provider website namecheap, for example. Go to Dashboard -> manage -> Advanced DNS, set DNS like the following figure. The IP address in the following screenshot is the IP address of github servers. You can also copy them from the official documentation set_dns
  4. Then you need to wait for several hours to 24 hours. You can check the DNS status on setting of your repository. It looks like the followinig figures. If it shows unsuccessful, you can try again.


  5. Set SSL.

    SSL can change your domain from http to https, so that browser would think your website become Safe. Otherwise, your website would look like: ssl_unsafe

    So how to set SSL? `At first you need to buy it from your domain provider. After that you need to install and activate it.` DO NOT BUY SSL! Because Github itself provides very simple method to achieve it. Just go to the setting of your repository, click Code and automation-> Pages -> Check Enforce HTTPS. You may need to wait for several minutes to observe its influence, and you may see the layout of the whole website broke down during these minites. You can try another browser, or clear the browser cache (e.g. Chrome incognito) and try to visit the website again. Please be patient and you will see the perfect performance finally.


Viewed times

Leave a Comment