Background#
For quite some time, my blog has been using the default domain name. And I actually didn't want to change it because my blog is hosted on GitHub Pages. I believe that relying on Microsoft, the reliability of the service provided by GitHub would be much greater than a domain name I personally applied for. I have always held the view that the death of a blog is not due to it no longer being updated, but rather the inability to access it. In other words, I believe that the continuity of a blog should take precedence over many other aspects.
But today, I unexpectedly received an email in my inbox notifying me that my domain name application has been approved. I was very surprised because I had forgotten about it. Since I now have a domain name at hand and have also learned relevant knowledge last semester, I decided to give it a try and summarize the corresponding steps.
Steps#
-
Apply/Purchase a Domain Name
I used EU.org. The advantage is that it's free, but it takes a long time. I applied on May 27th and it was only approved yesterday (August 16th).
-
Choose a Domain Name Resolution Service Provider
I chose hostry because it's free.
-
Navigate to your DNS provider and create either an ALIAS, ANAME, or A record.
Here is a part of my configuration:
SUBDOMAIN TYPE VALUE TTL, SEC @ A 185.199.108.153 86400 @ AAAA 2606:50c0:8000::153 86400 www CNAME euds63.github.io 86400
With Claude's help, I learned that:
- A record (Address Record): Maps a domain name directly to an IPv4 address. It is the most basic type of domain name record. GitHub provides 4 IP addresses instead of just one, primarily for load balancing and fault tolerance purposes.
- AAAA record (Quad-A record): Used to map a domain name to an IPv6 address.
- CNAME record (Canonical Name Record): Maps a domain name to another domain name, serving as an alias for the domain name.
It's worth noting www CNAME euds63.github.io 86400
. I saw in other tutorials that some set the SUBDOMAIN as @
, but in my case, it would result in an error: "Existing record 'SOA' conflicts with the code you are trying to create. Cname should not have the same name as other records."
- Github Configuration
- Under "Custom domain", type your custom domain, then click Save.
- Check the "Enforce HTTPS" option.
Clearly, GitHub simplifies many operations for us here. What are they?
According to Securing your GitHub Pages site with HTTPS, when you set or change your custom domain in the Pages settings, GitHub will:
- Begin an automatic DNS check. This check determines if your DNS settings are configured to allow GitHub to obtain a certificate automatically.
- If the check is successful, GitHub queues a job to request a TLS certificate from Let's Encrypt.
- Upon receiving a valid certificate, GitHub automatically uploads it to the servers that handle TLS termination for Pages. When this process completes successfully, a check mark is displayed beside your custom domain name.
But what if you're not using GitHub Pages? What should you do then?
Verification#
$ ping ds63.eu.org
Pinging ds63.eu.org [185.199.108.153] with 32 bytes of data:
Reply from 185.199.108.153: bytes=32 time=77ms TTL=54
Reply from 185.199.108.153: bytes=32 time=103ms TTL=54
Reply from 185.199.108.153: bytes=32 time=76ms TTL=54
Reply from 185.199.108.153: bytes=32 time=77ms TTL=54
Ping statistics for 185.199.108.153:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 76ms, Maximum = 103ms, Average = 83ms
$ ping -6 ds63.eu.org
Pinging ds63.eu.org [2606:50c0:8001::153] with 32 bytes of data:
Reply from 2606:50c0:8001::153: time=74ms
Reply from 2606:50c0:8001::153: time=81ms
Reply from 2606:50c0:8001::153: time=74ms
Reply from 2606:50c0:8001::153: time=72ms
Ping statistics for 2606:50c0:8001::153:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 72ms, Maximum = 81ms, Average = 75ms