When i enter the url https://www.troosbouw.com and press enter, browser says connection insecure. However when i enter https://troosbouw.com or troosbouw.com and press enter, apparently the connection is considered secure by the browser. I'm using firefox browser.
I think its an issue with my dns settings since i am redirecting www but not https://www
DNS settings (google domains):

Will adding a cname record for https://www which redirects to troosbouw.com (apex domain) fix this issue?
-- i'm using github pages for my website. I have the setting enforce HTTPS enabled and when im actually on the website my browser says the connection is secure (please see image below). However when i enter the website via a certain url (see below) the browser says the connection isnt secure and doesnt want to open the page. I don't know why.
Repository: github rep
How come when i enter the first url the browser doesn't consider the website secure when i do have enforce https enabled in github pages settings?
Connection security info image (screenshot taken after entering website via the other two url's which don't give me the connection not secure message):
The same issue is also present for the main domain (when user enters url https://www.troosbouw.com the browser says connection insecure but with https://troosbouw.com and www.troosbouw.com and troosbouw.com it works fine)
What am i doing wrong? Is there a way to make it work with https://www.troosbouw.com?

