Skip to content
Jan N Rose edited this page Mar 11, 2022 · 3 revisions

To use a custom domain (cmrcs.org) instead of the default one for GitHub Pages (cmrcs.github.io), two changes are required.

Google Domains

We use Google Domains as domain name registrar. The service handles purchasing the domain name and takes care of managing DNS for it.

On domains.google.com, go to the the DNS settings. Our domain name is cmrcs.org, which is an apex domain (i.e. it has no subdomain like blog in blog.website.com). According to the GitHub documentation, we must set an A type entry to the GitHub Pages IP addresses. Currently, they are

185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

but this may be subject to change in the future.

To allow accessing the site with and without www. in front of the domain name, we must enable this explicitly. The www is a subdomain, but visiting it is often treated as equivalent to visiting the apex domain itself. As such, we want to support this for the sake of convenience and to avoid user confusion. The GitHub documentation suggests setting a CNAME record for www and point it to cmrcs.github.io (the default GitHub Pages address for this repository).

The screenshot below summarises the records that need to be set:

googledomains

GitHub Pages

Navigate to the Pages settings in the GitHub repository and do the following. See the screenshot below for clarification.

  1. Add cmrcs.org as custom domain value.
  2. Wait for the DNS check to give the green tick mark.
  3. Enforce HTTPS.
ghpages

Troubleshooting

⏳ Be patient. Changes to DNS records need time to propagate, so wait at least 24 hours if something is not working as expected.

Clone this wiki locally