This website was created with GitHub Pages. By default, websites created with GitHub Pages are accessed via For example this website can be accessed via If you would like to point a custom domain you own (or plan to purchase) to your GitHub Pages, then read on.

First of all you need to own a custom domain. If you want to purchase one, I found IONOS to be the cheapest, and is what I used to purchase this domain.

With your custom domain you can direct both the www subdomain to GitHub Pages; and your apex domain to GitHub Pages. The apex domain is basically the root level domain.

For example is my apex domain, and is my www subdomain. I could have other subdomains if I wanted as well, such as,, etc. However I just use the apex domain and www subdomain for my GitHub Pages site.

So to set all this up, login to your account on your domain provider’s website and access your domain’s DNS settings.

Create a CNAME record as below:

  • CNAME record for www pointing to (replace username with your GitHub username)

Create 4 separate A records as below (Note that the IP addresses below were up to date as of September 24 2020. If these ever change you can obtain from here.):

  • A record for @ pointing to
  • A record for @ pointing to
  • A record for @ pointing to
  • A record for @ pointing to

Save all the changes. Below is a screenshot of how this will look in the DNS settings if your domain is with IONOS.

DNS Settings

Now go over to your GitHub repository for your page and click the settings button for the repository. Scroll down to the GitHub pages section and enter either your www or apex domain as your custom domain depending which you want to be the default. For example, if you set it to and visit, it will take you to

Press save. The Enforce HTTPS button won’t be clickable at first. But give it a few minutes then refresh the page and you should be able to tick the Enforce HTTPS button which is recommended.

GitHub Pages Settings

To test this out, type in your apex or www subdomain into your browser’s address bar, and it should take you to your GitHub Pages website!