SSL with CNAME subdomain

Avatar
  • updated
  • Answered

I am currently on shared hosting with free SSL, and have some images being stored on Google Cloud. I have a CNAME entry pointing to my Google Cloud project. When I access my website via HTTP, these images load just fine, but when I use the HTTPS version of my website, the images are broken, and the console gives me the error err_cert_common_name_invalid. I suspect this is because the SSL certificate for my site does not include the CNAME domain. Is there anyway to get the CNAME record to correctly work when using HTTPS?

Avatar
Joseph W Webmaster
  • Answered
Quote from anthony ingram-westover

Example domain name is http://adventureswithanthony.com/our-adventures/alaska-cruise-take-two/may_25_2016/ with an HTML img tag such as src=http://assets.adventureswithanthony.com/05_25_16/09_mountain.JPG

If I use http for the main domain, then it loads just fine. If I use https:, then the images don't load, no matter if I do http or https for the assets subdomain. The assets subdomain is a CNAME entry pointing to Google Cloud. If I go directly to https://assets.adventureswithanthony.com/05_25_16/09_mountain.JPG, it says that the SSL certificate isn't valid because the domain is assets.adventureswithanthony.com, and the certificate is for storage.googleapis.com. 

Hi Anthony!

One thing that you could try is to install an SSL on your server for you assets subdomain to see if that helps with the authentication issue you are seeing.

We have a guide in our support center that demonstrates how to manage AutoSSL certificates in cPanel that might be a useful reference for you.

Alternatively you could reach out to our support team via Chat or Ticket to get direct support for this problem.

Please let us know if you ever have any other questions for us!

Avatar

Example domain name is http://adventureswithanthony.com/our-adventures/alaska-cruise-take-two/may_25_2016/ with an HTML img tag such as src=http://assets.adventureswithanthony.com/05_25_16/09_mountain.JPG

If I use http for the main domain, then it loads just fine. If I use https:, then the images don't load, no matter if I do http or https for the assets subdomain. The assets subdomain is a CNAME entry pointing to Google Cloud. If I go directly to https://assets.adventureswithanthony.com/05_25_16/09_mountain.JPG, it says that the SSL certificate isn't valid because the domain is assets.adventureswithanthony.com, and the certificate is for storage.googleapis.com. 

Avatar
IMH Support Agent 1
  • Under review

Hello,

Thank you for contacting us regarding an "err_cert_common_name_invalid" error. We are happy to help but will need some additional information, such as the domain name of the site, and the method you are using to embed the images. For example, are you using this on a site built with HTML? Are you calling the images in using an https:// URL?

Thank you,

John-Paul