Https works only in apex domains and not in www domain

Hello,
I’m trying to setup my custom domain on my github pages personal site but I’m having some troubles with certificates.
I’ve followed many guide beside the one on the github help page but still didn’t manage.
The problem is that whenever i try to got in my page trough https://www.lucareccia.it it shows a warning about the certificate, while instead if I go to https://lucareccia.it it works just fine.

In my dns option I’ve got 4 empty dns A record looking like:
|[empty]|185.199.108.153|
|[empty]|185.199.109.153|
|[empty]|185.199.110.153|
|[empty]|185.199.111.153|
and 4 www A record looking like:
|www|185.199.108.153|
|www|185.199.110.153|
|www|185.199.109.153|
|www|185.199.111.153|

The CNAME in my github repo is:

lucareccia.it
www.lucareccia.it

Do any of you know what configuration did I set wrong?
Thanks

2 Likes

Hi @DrRek, welcome to the GitHub Support Community!

I posted the solution I am using for my personal GitHub Pages site in another thread. This won’t meet everyone’s needs, but it meets mine. My personal domain is galaxyallie.space and I wanted people to be able to type www.galaxyallie.space without getting a certificate error. This configuration works for me:

  • CNAME file contains galaxyallie.space
  • custom domain setting is galaxyallie.space
  • A records for @ point to 185.199.108.153, 185.199.109.153, 185.199.110.153, and 185.199.111.153
  • CNAME record for www points to galaxyallie.github.io.

Please let me know if this works for you. And again, welcome!

2 Likes