Hugo

February 21, 2024

—

GitHub Hugo

Hugo is a fast static site generator written in Go. This page shows how this website is deployed on GitHub Pages with a custom domain: the custom domain setting in GitHub, the matching baseURL in the Hugo config, the DNS records at the domain registrar (the GitHub Pages A records and the www CNAME), and how to check them with dig.

Contents

GitHub Pages -> Custom Domain

https://github.com/althaser/website/settings/pages

Custom domain: althaser.eu

Article image DNS check successful

baseURL in config.yaml

baseURL: "https://althaser.eu"

DNS Server Configurations

A	    @	    185.199.108.153	                1 hour
A	    @	    185.199.109.153	                1 hour
A	    @	    185.199.110.153	                1 hour
A	    @	    185.199.111.153	                1 hour
CNAME	www	    althaser.eu.	                1 hour
-------------------------------------------------------
CNAME	www	    althaser.github.io.             1 hour
-------------------------------------------------------
NS      @       ns07.domaincontrol.com.	        1 hour
NS      @       ns08.domaincontrol.com.	        1 hour
SOA     @       ns07.domaincontrol.com.	        1 hour

It might take some time until it propagates to all DNS Servers. Check for A entries in https://www.whatsmydns.net/

dig outputs

$ dig althaser.eu +short
185.199.111.153
185.199.110.153
185.199.109.153
185.199.108.153

$ dig althaser.eu +nostats +nocomments +nocmd
;althaser.eu. 	        IN	A
althaser.eu. 	3600	IN	A	185.199.111.153
althaser.eu.	3600	IN	A	185.199.110.153
althaser.eu.	3600	IN	A	185.199.109.153
althaser.eu.	3600	IN	A	185.199.108.153

$ dig www.althaser.eu +nostats +nocomments +nocmd
;www.althaser.eu.		        IN	A
www.althaser.eu.	    1244	IN	CNAME	althaser.eu.
althaser.eu.		    3600	IN	A	    185.199.110.153
althaser.eu.		    3600	IN	A	    185.199.109.153
althaser.eu.		    3600	IN	A	    185.199.108.153
althaser.eu.		    3600	IN	A	    185.199.111.153

$ dig althaser.github.io +nostats +nocomments +nocmd
;althaser.github.io.		    IN	A
althaser.github.io.	    3413	IN	A	185.199.110.153
althaser.github.io.	    3413	IN	A	185.199.111.153
althaser.github.io.	    3413	IN	A	185.199.109.153
althaser.github.io.	    3413	IN	A	185.199.108.153

GitHub supports https via Let’s Encrypt. Enable enforce ssl via github UI -> github project -> Settings -> Pages: Set your Custom domain and Save. Then enable enforce HTTPS.

This one can only be activated once it is propagated on most DNS Servers. Check https://www.whatsmydns.net/ as above.