Skip to main content

Forwarding www subdomain with SSL github pages [Resolved]

I've set up a personal website on my apex domain using Github Pages and Google Domains.

I've tried to forward to which works unless you type in, which results in NET::ERR_CERT_COMMON_NAME_INVALID, claiming the security certificate is from not

Note that I also have "enforce https" turned on in GitHub Pages.

Export of my DNS records: 21600 IN SOA 23 21600 3600 259200 300 21600 IN NS 21600 IN NS 21600 IN NS 21600 IN NS 3600 IN A 3600 IN A 3600 IN A 3600 IN A 3600 IN CAA 0 issue "" 3600 IN MX 5 3600 IN MX 10 3600 IN MX 20 3600 IN MX 30 3600 IN MX 40 3600 IN TXT "v=spf1 ~all" 3600 IN CNAME

What is the proper way to forward the www subdomain which will not result in problems with SSL?

Question Credit: KingofGamesYami
Question Reference
Asked July 18, 2019
Posted Under: Network
2 Answers

After some configuration I found the answer:

The proper way to forward a subdomain as I wanted was to add a synthetic record in Google Domains, redirecting to with SSL enabled. It will initially tell you the record has an error with the certificate but this will resolve itself within a day or two.

credit: KingofGamesYami
Answered July 18, 2019

In How to setup google domain for github pages, you can see, in the fourth step:

Go to your github repository settings page, under Settings > GitHub Pages > Custom domain remove your custom domain and save. GitHub Settings Github Pages.

Then add it back and save again. Now you should be able to check the "Enforce HTTPS" checkbox and secure your site!

credit: J.M. Robles
Answered July 18, 2019
Your Answer