I have purchased domain with godaddy. I am hosting the static website in Google cloud. I am not able to configure SSL for custom domain in google cloud. I am using storage in google cloud for this. Please help with steps. Thanks
0
votes
You may want to have a look at this: cloud.google.com/storage/docs/troubleshooting#https. You'll have to set up a load balancer, use a third-party Content Delivery Network with Cloud Storage, or serve your static website content from Firebase Hosting instead of Cloud Storage.
– LundinCast
@LundinCast - You should post your comment (expanded a bit) as the answer.
– John Hanley
1 Answers
1
votes
In order to use SSL certificates in GCP you need to have a Load Balancer created. This document explains it from the other point of view, how to add a Cloud Storage bucket when you already have a Load Balancer created, but the idea is the same.
Steps to take:
- Create a HTTPs Load Balancer in Google Cloud Platform
- Configure Backend to point to your Cloud Storage bucket
- Configure Frontend to use your SSL certificate
It is a best practice to separate a dynamic part of the website (by using a backend to point to an instance group - that will go to GCE instance) and a static part (choosing a backend to be Cloud Storage). This way you are insuring the speed and availability of the website.
You should also consider a CDN to cache a load balanced content close to your users.