Learn today how to host a static website on Google Cloud using GCS in just 5 steps 

If you are a person who has a great love for blogging and wants to continue with your own site, this blog is only for you. Today, we will talk about the static website. According to experts, if you want to have a website and do blogging without spending that much, you should start with a static website. A static website is able to deliver your content as exactly you have sorted it. But these sites are able to contain other web technologies such as CSS, HTML, JavaScript, and so on. But they are not able to contain dynamic content such as any server-side script (like PHP). 

Having such a website is a great support as it helps you to bring your creative skills. If you want to do the same, we can guide you to do that. Making as well as hosting a static website are now easier tasks with the support of Google Cloud. How? Let’s explore-

Before you start developing a static website, you should make sure that you have properly set up in Google Cloud Console.  And for that, you need to ensure these-

  • You should create a GDP project
  • You should set up a billing account
  • You need to have a top-level domain 

If you have ensured these three things, you are all set to develop a static website on Google Cloud. So, now, know the steps-

Step 1: Point the domain to Google Cloud Storage

The very first step of creating a website is to connect the domain to cloud storage. In order to make it possible, you have to create a CNAME record and that should point to c.storage.googleapis.com. If you find any problem, you can take the help of your domain registration service. 

Step 2: Create the storage bucket 

In order to host a static website on Google Cloud, now you need to create a Google Cloud Storage Bucket account. 

  • Browse Google Cloud Console
  • Hit the cloud storage
  • And click on the create bucket option 

Here the bucket name should match with the CNAME 

Step 3: Upload your static website 

Now you need to upload the files that you want your static website should serve. In order to do this job, there are two ways for you. The first one is to directly upload the files with the help of Google Cloud Console. And the second option is using the gsutil command line. The second option is popular among people who already have a website. 

Step 4: Access control and indexing

After uploading all the required files now it’s the time to make sure that they are shared for access too. You can make all files publicly accessible or you can customize the access option. If you make all the files accessible, the process will be much easier as well as faster. 

In order to guide the users a bit better, you can bring an index page suffix and a custom error page. When your users will search a specific thing and that thing is not available on your site, a 404 error page can be helpful there to deliver the right message to the users. 

Step 5: Run and test your static website

This is the last step of hosting a static website on Google Cloud. Here you need to test your website. You should remember a fact that Google Cloud Storage supports only HTTP. 

These are the best 5 ways that every web development company follows when it comes to hosting a static website on GCS. In order to make such a website, you may require some professional help and expertise. Expert professionals can help you to host your site on the GCS overnight with their experience and expertise. 

Guest article written by: Vasu Naman is the Founder and Director of Vyrazu Labs, a research-based development tech-company which has been featured in Nasscom 10K Startup, Smartfity 2018. Vyrazu Labs is working with Enterprises, SMB’s and Start-ups to improve their efficiency through the implementation of Digital Tools and help them to discover new possibilities and great outcomes in their business by doing constant innovation in the field of their business.

1 thought on “Learn today how to host a static website on Google Cloud using GCS in just 5 steps ”

  1. I’ve had my 2 domains which I wanted to host for a long time, thanks for the detailed tutorial it really helped me solve the issue

    Reply

Leave a Comment