Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 1

https://www.dont-tou.ch -> https://dont-tou.ch works but not the reverse

I think that ghpages with custom domains is not working as described in https://help.github.com/en/github/working-with-github-pages/configuring-a-custom-domain-for-your-git...
 
Obviously, I might also have made a stupid error.
 
The setup that I tried to do is described here:
 

An apex domain is configured with an A, ALIAS, or ANAME record through your DNS provider. For more information, see "Managing a custom domain for your GitHub Pages site."

If you are using an apex domain as your custom domain, we recommend also setting up a www subdomain. If you configure the correct records for each domain type through your DNS provider, GitHub Pages will automatically create redirects between the domains. For example, if you configure www.example.com as your custom domain for your site, and you have ALIAS and CNAME records set up for the apex and www domains, then example.com will redirect to www.example.com. For more information, see "Managing a custom domain for your GitHub Pages site."

 
So I set the CNAME to "www.dont-tou.ch".
 
Then, this is what I set up in DNS. I am not sure if my DNS provider allows ALIAS/ANAME records. Therefore, I followed the instructions for setting up the A records.
 
This is what I see from my system. It looks right to me but maybe someone can check for typos:
 
❯ dig dont-tou.ch +noall +answer
dont-tou.ch. 3600 IN A 185.199.112.153
dont-tou.ch. 3600 IN A 185.199.108.153
dont-tou.ch. 3600 IN A 185.199.109.153
dont-tou.ch. 3600 IN A 185.199.111.153
 
Furthermore, it was also recommended to set up a www subdomain, which I did following these instructions:
 
❯ dig www.dont-tou.ch +noall +answer
www.dont-tou.ch. 3600 IN CNAME dont-touch-my-mushroom.github.io.
dont-touch-my-mushroom.github.io. 3600 IN A 185.199.108.153
dont-touch-my-mushroom.github.io. 3600 IN A 185.199.109.153
dont-touch-my-mushroom.github.io. 3600 IN A 185.199.110.153
dont-touch-my-mushroom.github.io. 3600 IN A 185.199.111.153
 
With this setup, I (and my friends) always got a certificate error for "https://dont-tou.ch". "https://www.dont-tou.ch" itself would work.
 
If I set the CNAME to dont-tou.ch, I get a correct certificate at https://dont-tou.ch. https://www.dont-tou.ch gets redirected to https://dont-tou.ch. That is all fine but there were some places where they pushed for using the www subdomain so I found that rather strange.