📔 Configuring a custom domain for your GitHub Pages site
Setting up a CNAME for your GitHub Pages does not require additional payment, but you need to have a private domain first. Here, we assume that we have already purchased a domain from Godaddy, so let's go to the Godaddy DNS settings page to configure it.
1. First, query GitHub's IP address via Terminal:
dig xxxx.github.io
![](https://cmwang.net/content/images/2024/02/4.png)
2. Go to the Godaddy DNS page and set up 4 A Records and 1 CNAME Record, please refer to the image.
![](https://cmwang.net/content/images/2024/02/3.png)
3. Add a CNAME file with xxx.{Domain Name} to the private repo, ex. blog.xxx.com.
![](https://cmwang.net/content/images/2024/02/5.png)
4. Set up CNAME on the page and check the Enforce HTTPS option.
![](https://cmwang.net/content/images/2024/02/1.png)
![](https://cmwang.net/content/images/2024/02/2.png)
It might take some time to take effect. If everything is set up correctly, the DNS Check in step 4 should pass.