0
votes

I uploaded a website into Google cloud platform > storage and set up the DNS and it goes to google then says an error message about the bucket (I can't reproduce the error message, but it doesn't go to the right location). Google gives me a link to the website and I can get to it from: https://storage.googleapis.com/pampierce.me/index.html but https://pampierce.me/index.html doesn't work.

Currently, the DNS CNAME is set to: c.storage.googleapis.com. What should it be set to?

Or is the problem that I shouldn't put an HTML / CSS / JS only website in Storage? If so, then where / how?

Thanks.

1

1 Answers

0
votes

The issue is with the name of the bucket, this is why it is not working.

I checked the CNAME record for www.pampierce.me and it points to c.storage.googleapis.com. but pampierce.me points to 91.195.240.103. Note that www.pampierce.me is not the same as pampierce.me. This is about DNS but in general this config is okay.

Actually, the real issue is with your bucket. As well you can create a bucket with the name pampierce.me, this does not work when using Cloud Storage to host a site and for this reason the bucket should be named www.pampierce.me. This is mentioned here.

Once you have created the bucket www.pampierce.me and set all the files and steps you have already done, everything should be working fine. Also the way to access is http://www.pampierce.me/index.html (note that as before is not the same as http://pampierce.me/index.html).

Finally you will notice that I say http and not https and the reason is because Cloud Storage does not supports SSL for hosting a website

In case you may want to access using https://pampierce.me (naked domain and HTTPS), I suggest to follow this tutorial but also implies to use a Load Balancer which also means extra cost. Also the issue is with Cloud Storage and App Engine is a different product.