SushanthBobby About me


How to host a static website using Google Clouds
by SUSHANTH BOBBY LLOYDS, 3 March 2018



1
Register in Google Cloud
Register in google cloud as you will be using its storage and with free credit of $300, its free for a year. Google may check whether it’s a valid debit/credit card by billing Rs.50 and reversing the transaction. Caution : Once you register your debit card be careful/watchful of all your actions in google cloud sites.
2
Go to Google Cloud Console
3
Under Storage, hover on Storage and select "Browser"
4
Create a bucket
Since my site name is bobbydreamer.com. I am naming the bucket as www.bobbydreamer.com . When you bucket name with dot(.) symbol google will check, if that domain is available. So, it’s better to do the below after purchasing the domain from google domains.
5
Click the bucket name once its created
6
Now you can “Upload Files” (OR) Drag&Drop them.
7
Check and set Share publicly
Go and click “Share publicly” checkbox either in the column header or specific files. When you check this only it will be available for use by others, till then its only for your personal use. Repeat this process for all items/objects which your webpage is going use(fonts/js/images/css) in all the sub-folders. Once you click “Share Publicly”, “Public link” should appear. You can click the link to see the page temporarily (debugging purposes).
8
Edit Web Configuration
Click on the bucket title and go back and then click the three dots at the right-end and Select “Edit website Configuration”
9
Enter the name of the homepage(index.html) and error handling page(404.html) and click save
10
Go to Google Domains(https://domains.google.com/). If you don’t have a site yet, get one. It’s around Rs.899 per year. Below is the site which I have created.
11
Select Configure DNS. Go to “Custom resource records” section at the bottom and type-in data like below and click “Add”
12
It will appear as below, don’t worry that your domain name didn’t appear. Its like that only.
13
That’s it. It will take a minute or two to get the website online.
NOTE
All the above will get www.bobbydreamer.com loaded, but if i type bobbydreamer.com i will get below error message. To resolve this, you will have to update “Synthetic Records” entires. It will forward bobbydreamer.com to www.bobbydreamer.com. This is recommended to carry-on and perform the below steps as well.
1
Setting up Synthetic Records
2
Type in the below information, type @ symbol at the subdomain and your site address in “destination URL” and then Click “Add”
3
It should look like and in a minute this should get updated and now you should be able to get to www.bobbydreamer.com just by typing bobbydreamer.com as well.
NOTE
Below error message might come, if bucket is deleted.
1
You will get below error message